help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re:Re: how to compile c++0x file with mkoctfile command?


From: Sergei Steshenko
Subject: Re:Re: how to compile c++0x file with mkoctfile command?
Date: Sun, 2 Jun 2013 15:02:07 -0700 (PDT)

--- On Sun, 6/2/13, Li Patrick <address@hidden> wrote:

From: Li Patrick <address@hidden>
Subject: Re:Re: how to compile c++0x file with mkoctfile command?
To: "Sergei Steshenko" <address@hidden>, address@hidden
Cc: address@hidden
Date: Sunday, June 2, 2013, 11:24 AM

Dear Sergei,

thanks for your reply. Here is the log when I run the command "mkoctfile 
testCode.cpp --link-stand-alone -o testCode":

address@hidden:~/Documents/cpp/early_warning_v1$ mkoctfile testCode.cpp 
--link-stand-alone -o testCode
In file included from /usr/include/c++/4.6/random:35:0,
                 from URandom.h:40,
                 from TransitionFirms.h:42,
                 from testCode.cpp:37:
/usr/include/c++/4.6/bits/c++0x_warning.h:32:2: 错误: #error This file requires 
compiler and library support for the upcoming ISO C++ standard, C++0x. This 
support is currently experimental, and must be enabled with the -std=c++0x or 
-std=gnu++0x compiler options.
In file included from TransitionFirms.h:42:0,
                 from testCode.cpp:37:
... ...

When I tried the command "mkoctfile -std=c++0x  testCode.cpp  
--link-stand-alone  -o testCode" or " mkoctfile testCode.cpp -std=c++0x 
--link-stand-alone -o testCode", I got the error information as follows.

address@hidden:~/Documents/cpp/early_warning_v1$ mkoctfile -std=c++0x  
testCode.cpp  --link-stand-alone  -o testCode
mkoctfile: unrecognized argument -std=c++0x
address@hidden:~/Documents/cpp/early_warning_v1$ mkoctfile testCode.cpp 
-std=c++0x --link-stand-alone -o testCode
mkoctfile: unrecognized argument -std=c++0x

Best regards,

Patrick Li


At 2013-06-02 05:43:42,"Sergei Steshenko" <address@hidden> wrote:
>
>--- On Fri, 5/31/13, Li Patrick <address@hidden> wrote:
>
>From: Li Patrick <address@hidden>
>Subject: how to compile c++0x file with mkoctfile command?
>To:address@hidden,address@hidden
>Date: Friday, May 31, 2013, 5:47 PM
>
> Hi there,
>
>I am trying to compile a c++ file by mkoctfile. I tried the following command 
>in Ubuntu12.04:
>
>mkoctfile testCode.cpp   --link-stand-alone - test
>
>It didn't work out. I am thinking if I can add to mkoctfile with the option 
>"-std=c++0x" as what I can do in gcc.
>
>Anyone has experience in compiling with this option "-std=c++0x"?
>
>Thanks!
>
>Patrick
>
>
>
>
>-----Inline Attachment Follows-----
>
>_______________________________________________
>
>
>Without seeing the error messages and probably the source it's hard to tell.
>
>Regards,
>  Sergei.


------------------------------------------------------------------

'mkoctfile' is a shell script.

As such it can be copied to a location of your choosing, so you'll have write 
permission and can hack it.

In the script you can add the needed 'g++' options.

Maybe there is a more elegant way, but what I've proposed is a brute force way.

Regards,
  Sergei.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]