[SCons/Matlab] Link statically to libstdc++ on Linux

Matlab 2016a now uses some C++11 features, and symbols included in some of the
Matlab libraries conflict with the versions from system libraries that Cantera
is compiled with and expects to find, resulting in difficult-to-diagnose memory
errors.
This commit is contained in:
Ray Speth 2016-07-13 10:56:44 -04:00
parent 69f25b41dc
commit e2d7e178b3

View file

@ -50,7 +50,8 @@ elif os.name == 'posix':
mexSuffix = '.mexglx'
linkflags.extend(['-Wl,--no-undefined',
'-Wl,--version-script,src/matlab/mexFunction.map'])
'-Wl,--version-script,src/matlab/mexFunction.map',
'-static-libstdc++'])
localenv.Prepend(CPPPATH=['#include', '#src', matlab_include])
localenv.Append(CPPDEFINES=['MATLAB_MEX_FILE'],