Commit 1b317f1b authored by Sébastien Villemot's avatar Sébastien Villemot
Browse files

Fix linking of static file with use_dll under Windows

The "Static" symbol was not exported; instead, it was the non-existing
"Dynamic" symbol which was exported.
parent bb9c9c56
/*
* Copyright (C) 2006-2012 Dynare Team
* Copyright (C) 2006-2013 Dynare Team
*
* This file is part of Dynare.
*
......@@ -560,11 +560,11 @@ ModFile::writeOutputFiles(const string &basename, bool clear_all, bool no_log, b
if (msvc)
// MATLAB/Windows + Microsoft Visual C++
mOutputFile << " eval('mex -O LINKFLAGS=\"$LINKFLAGS /export:Dynamic\" " << basename << "_dynamic.c " << basename << "_dynamic_mex.c')" << endl
<< " eval('mex -O LINKFLAGS=\"$LINKFLAGS /export:Dynamic\" " << basename << "_static.c "<< basename << "_static_mex.c')" << endl;
<< " eval('mex -O LINKFLAGS=\"$LINKFLAGS /export:Static\" " << basename << "_static.c "<< basename << "_static_mex.c')" << endl;
else if (cygwin)
// MATLAB/Windows + Cygwin g++
mOutputFile << " eval('mex -O PRELINK_CMDS1=\"echo EXPORTS > mex.def & echo mexFunction >> mex.def & echo Dynamic >> mex.def\" " << basename << "_dynamic.c " << basename << "_dynamic_mex.c')" << endl
<< " eval('mex -O PRELINK_CMDS1=\"echo EXPORTS > mex.def & echo mexFunction >> mex.def & echo Dynamic >> mex.def\" " << basename << "_static.c "<< basename << "_static_mex.c')" << endl;
<< " eval('mex -O PRELINK_CMDS1=\"echo EXPORTS > mex.def & echo mexFunction >> mex.def & echo Static >> mex.def\" " << basename << "_static.c "<< basename << "_static_mex.c')" << endl;
else
mOutputFile << " error('When using the USE_DLL option, you must give either ''cygwin'' or ''msvc'' option to the ''dynare'' command')" << endl;
#else
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment