On Mar 18, 2013, at 3:17 PM, Adrian Butscher <[email protected]> wrote:
> 
> 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?  

The configure script creates a file called "config.log", which includes the 
exact error output of all the commands.  Open it up, search for "mex", and you 
should find out the exact error message that caused the mex command to fail.

> 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.  

The reason for the [[]] in the configure.ac file is that the text gets 
preprocessed by m4; the actual C file will contain [].
_______________________________________________
NLopt-discuss mailing list
[email protected]
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/nlopt-discuss

Reply via email to