Open dpo opened 8 years ago
Thanks Dominique!
In R2015b, I had to make the same changes in makefile
and matlab_files/makefile
, but the MEX files compiled without trouble without generating a mexopts.sh
(which now appears to be called mex_XXX_maci64.xml
). After the fact, I generated the mex_C++_maci64.xml
and noted that the C++ flags do include -std=c++11
by default.
I finally successfully built SYM-iLDL on OSX with Matlab R2013b using the following steps:
makefile
to setCC
tog++-5
(which I installed via Homebrew). I wasn't able to build the MEX files withclang++
(the culprit seems to be this line but it's not clear to me how it should be changed). Note that on OSX,g++
ships with the OS but is basically an alias forclang++
.matlab_files/makefile
to define the full path tomex
. I imagine this is also important on Linux because there is a LaTeX-related executable namedmex
that usually appears first on thePATH
. In my case, I setMEX=/Applications/Matlab/MATLAB_R2013b.app/bin/mex
./Applications/Matlab/MATLAB_R2013b.app/bin/mex -setup
to generate a fresh~/.matlab/R2013b/mexopts.sh
. Somehow I had settings in my previousmexopts.sh
that caused compilation to fail (I wasn't able to determine what settings). At this point, the compilation still fails with the messageThe solution consists in adding
-std=c++11
to theCXXFLAGS
in themexmaci64
section ofmexopts.sh
so it looks like this:This might have been fixed in more recent versions of Matlab.
I'll upgrade Matlab soon to the latest release and I'll report here if the same steps are necessary. In the mean time, I hope this is useful to somebody. Thanks for iLDL!