Add a New Comment (Rich Markup)
Comment Type & Canned Response: None None > Multiple Canned Responses Fixed in development Crash with no stack trace Already fixed in newer version Fixed in stable Bad description Bad description and crash Bad stack trace Obsolete version Duplicate and not fixed Duplicate and needs more info Duplicate and fixed Need info and old
I checked in a change to pass through unrecognized options beginning with '-' to the underlying compiler. See this cset (http://hg.savannah.gnu.org/hgweb/octave/rev/b59aabc08e63). This should work now. Closing report.
OK, that works for me for the time being. Just have to remember not to leave some wrong options in one of the 45 environment variables that control the behavior of mkoctfile :-]
The most straightforward way currently is through the use of environment variables. If you're running mkoctfile from a shell, something like
$ CXXFLAGS="$(mkoctfile -p CXXFLAGS) -std=c++11" mkoctfile ...
should work. If you're using the Octave function, then maybe something like
octave:1> setenv ("CXXFLAGS", [octave_config_info.CXXFLAGS " -std=c++11"]); octave:2> mkoctfile ...
Does that work for you or do you still have the need to pass -std options as options to mkoctfile?
Platform: MS Windows 8.1, Cygwin64, g++ (GCC) 4.8.2 I would like to use the great new C++ 2011 features for generating .oct files. Unfortunately, there doesn't seem to be a straightforward way to pass the option "-std=c++11" or "-std=c++0x" to g++ through mkoctfile. I found the possibility
$ mkoctfile -v -Wall -Wextra -W\ -std=c++11 foo.cpp g++ -c -I/usr/include/octave-3.8.0/octave/.. -I/usr/include/octave-3.8.0/octave -ggdb -O2 -pipe -Wall -Wextra -W -std=c++11 foo.cpp -o foo.o g++ -shared -Wl,--export-all-symbols -Wl,--enable-auto-import -Wl,--enable-runtime-pseudo-reloc -Wall -Wextra -W -std=c++11 -o foo.oct foo.o -L/usr/lib/octave/3.8.0 -loctinterp -loctave
but it looks weird and leaves a stray "-W" (an obsolete synonym for "-Wall" which is probably harmless) on the g++ command line.
(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)
Attach Files: Comment:
No files currently attached
Depends on the following items: None found
Items that depend on this one: None found
There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.
Only project members can vote.
Please enter the title of George Orwell's famous dystopian book (it's a date):
Follow 4 latest changes.
Copyright © 2022 Free Software Foundation, Inc. Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved. The Levitating, Meditating, Flute-playing Gnu logo is a GNU GPL'ed image provided by the Nevrax Design Team. Source Code
Powered by Savane 3.9