I am having a number of problems with compiling files using mex on matlab r2011a on Mac OS 10.9.2. I know that I need to have the compiler flag -std=gnu++11 in order to make things work. I have updated the mexopts.sh file (~/.matlab/r2011a/mexopts.sh) so that the CXXFLAGS has the required flag added in. However it doesn't seem to be working.
If I look at the compiler configuration:
cc = mex.getcompilerconfigurations('c++')
The returned cc.details.CompilerFlags is not in any way related to the value that is in mexopts.sh. That is probably why things are not working.
Any ideas on how to fix this so that the compiler configuration actually reflects the mexopts.sh file?
mex -setupand selecting the compiler again, after you made the modifications? - Praetorian