Hi,

I'm having trouble installing NLOpt-2.3 on my Mac running OSX 10.7.5, 
specifically the Matlab plugins.  

I run the configure file with this command:

./configure --enable-shared MATLAB=/Applications/MATLAB_R2012a.app/matlab 
MEX=/Applications/MATLAB_R2012a.app/bin/mex

And a critical line of the output reads:

checking for extension of compiled mex files... configure: WARNING: 
/Applications/MATLAB_R2012a.app/bin/mex failed to compile a simple file; won't 
compile Matlab plugin

Is there someone who might be able to help me work through this?  

One test that I did is to find the lines in the configure.ac file which creates 
the test file:

cat > conftest.c <<EOF
#include <mex.h>
void mexFunction(int nlhs, mxArray *plhs[[]],
                 int nrhs, const mxArray *prhs[[]]) { }
EOF

To test this, I created the conftest.c file manually with these contents, and 
ran /Applications/MATLAB_R2012a.app/bin/mex on that file.  This FAILED to 
create a mex file.  Next, I changed the text of conftest.c to 

#include <mex.h>
void mexFunction(int nlhs, mxArray *plhs[],
                 int nrhs, const mxArray *prhs[]) { }

(note [[]] replaced by []) and ran /Applications/MATLAB_R2012a.app/bin/mex once 
again.  This SUCCEEDS in creating a mex file.  

So the next thing I did was to change the configure.ac file to this effect, and 
run autoconf to create a new configure script.  I ran this again... to no 
avail.  I get the same error message as before.

Thanks for your help!

Adrian Butscher


_______________________________________________
NLopt-discuss mailing list
[email protected]
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/nlopt-discuss

Reply via email to