Skip to content

Commit

Permalink
[SCons/Matlab] Link statically to libstdc++ on Linux
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
speth committed Jul 13, 2016
1 parent 69f25b4 commit e2d7e17
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/matlab/SConscript
Original file line number Diff line number Diff line change
Expand Up @@ -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'],
Expand Down

0 comments on commit e2d7e17

Please sign in to comment.