c++ - Error in mkoctfile -


i trying compile following in octave4.0 in linux 14.04 :

mex cflags="\$cflags -std=c99" -largearraydims read_data.cpp

mex cflags="\$cflags -std=c99" -largearraydims write_data.cpp

the following error crops :

****mkoctfile: unrecognized argument cflags=-std=c99**

**warning: mkoctfile exited failure status****

anyone knows means , how fix this?

you should run setenv('cflags','-std=c99 -whatever -else') command (inside octave) like, instance:

setenv('cflags','-std=c99'); mkoctfile --mex file.c 

but perhaps want add cflags have. well, know no elegant way this, manually

mkoctfile -p cflags 

and copy-paste result '-std-c99' option, or set in shell before entering octave

~$ cflags=$cflags:"-std-c99" octave  

source: http://octave.1599824.n4.nabble.com/mkoctfile-cflags-not-recognised-td4281373.html


Comments