From fc719ad8c7649f566ce969d6c32c27e5f8192345 Mon Sep 17 00:00:00 2001 From: michel Date: Tue, 8 Dec 2009 11:49:25 +0000 Subject: [PATCH] 4.1 preprocessor: exporting Dynamic symbol when making mex file for dynamic model with Matlab git-svn-id: https://www.dynare.org/svn/dynare/trunk@3208 ac1d8469-bf42-47a9-8791-bf33cf982152 --- ModFile.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ModFile.cc b/ModFile.cc index 6d971096..5090649c 100644 --- a/ModFile.cc +++ b/ModFile.cc @@ -297,7 +297,7 @@ ModFile::writeOutputFiles(const string &basename, bool clear_all) const // Compile the dynamic MEX file for use_dll option if (use_dll) mOutputFile << "if ~exist('OCTAVE_VERSION')" << endl - << " eval('mex -O LDFLAGS=''-pthread -shared -Wl,--no-undefined'' " << basename << "_dynamic.c')" << endl // This command is enclosed in an eval(), because otherwise it will make Octave fail + << " eval('mex -O LINKER=''echo EXPORTS > mex.def & echo mexFunction & echo Dynamic >> mex.def & gcc-3'' LDFLAGS=''-pthread -shared -Wl,--no-undefined'' " << basename << "_dynamic.c')" << endl // This command is enclosed in an eval(), because otherwise it will make Octave fail << "else" << endl << " mex " << basename << "_dynamic.c" << endl << "end" << endl;