[Top][All Lists]

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

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

From: Martin Werner
Subject: Re: how to compile c++0x file with mkoctfile command?
Date: Wed, 18 Feb 2015 11:05:00 +0100
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0

You have to do this via the CFLAGS variable, my makefile does:

COMMON_CXX =  -Wall -Wextra -std=c++11 -O4
OCT_CXX = `mkoctfile -p CXXFLAGS` $(COMMON_CXX)
         mkoctfile traclus-octave.cpp -o traclus.oct

Am 02.06.2013 um 20:24 schrieb Li Patrick:
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@hiddenaddress@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"?
>-----Inline Attachment Follows-----
>Without seeing the error messages and probably the source it's hard to tell.
>  Sergei.

Help-octave mailing list

Dr. Martin Werner
Mobile and Distributed Systems Group
Institute for Computer Science, Ludwig-Maximilians-University Munich
Room E 011, Oettingenstraße 67, 80538 Munich, Germany
Phone: +49 89 2180 9127 

reply via email to

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