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.