Reputation: 351
I am trying compile he 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 up :
****mkoctfile: unrecognized argument CFLAGS=-std=c99**
**warning: mkoctfile exited with failure status****
Anyone knows what this means and how to fix this?
Upvotes: 2
Views: 1141
Reputation: 344
You should run a setenv('CFLAGS','-std=c99 -whatever -else')
command (inside octave) like, for instance:
setenv('CFLAGS','-std=c99');
mkoctfile --mex file.c
But perhaps you want to add the CFLAGS you already have. Well, I know no elegant way to do this, so I would do it manually with a
mkoctfile -p CFLAGS
And copy-paste the result together with your '-std-c99'
option, or set it up in the shell before entering octave with a
~$ CFLAGS=$CFLAGS:"-std-c99" octave
Source: http://octave.1599824.n4.nabble.com/mkoctfile-CFLAGS-not-recognised-td4281373.html
Upvotes: 1