From abf2e0408430adb0c5e72ede47f91b8d6800a31b Mon Sep 17 00:00:00 2001 From: Ray Speth Date: Wed, 11 Apr 2012 17:37:33 +0000 Subject: [PATCH] Changed visibility of symbols in ctmethods.mex on Linux This allows Cantera to use BLAS/LAPACK functions included in the mex file instead of the incompatible ones that are part of Matlab. --- src/matlab/SConscript | 3 +++ src/matlab/mexFunction.map | 6 ++++++ 2 files changed, 9 insertions(+) create mode 100644 src/matlab/mexFunction.map diff --git a/src/matlab/SConscript b/src/matlab/SConscript index 259e718fc..caaf46b8d 100644 --- a/src/matlab/SConscript +++ b/src/matlab/SConscript @@ -46,6 +46,9 @@ elif os.name == 'posix': else: matlab_libs = pjoin(localenv['matlab_path'], 'bin', 'glnx86') + linkflags.extend(['-Wl,--no-undefined', + '-Wl,--version-script,src/matlab/mexFunction.map']) + mexSuffix = '.mex%s%i' % (mexPlatform, localenv['OS_BITS']) localenv.Append(CPPPATH=['#include', '#src', matlab_include], diff --git a/src/matlab/mexFunction.map b/src/matlab/mexFunction.map new file mode 100644 index 000000000..b608d545c --- /dev/null +++ b/src/matlab/mexFunction.map @@ -0,0 +1,6 @@ +MEX { + global: + mexFunction; + local: + *; +};