Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Dynare
dynare
Commits
83eeafa3
Commit
83eeafa3
authored
Jun 14, 2016
by
Houtan Bastani
Browse files
fix mex file compilation with MSVC. Closes
#1227
parent
2bbfb876
Changes
1
Hide whitespace changes
Inline
Side-by-side
matlab/utilities/general/dyn_mex.m
View file @
83eeafa3
...
...
@@ -15,7 +15,7 @@ function dyn_mex(win_compiler,basename,force)
%
% Copyright (C) 2015 Dynare Team
% Copyright (C) 2015
-2016
Dynare Team
%
% This file is part of Dynare.
%
...
...
@@ -49,8 +49,9 @@ if ~exist('OCTAVE_VERSION')
if
ispc
if
strcmp
(
win_compiler
,
'msvc'
)
% MATLAB/Windows + Microsoft Visual C++
eval
([
'mex -O LINKFLAGS="$LINKFLAGS /export:Dynamic" '
basename
'_dynamic.c '
basename
'_dynamic_mex.c'
])
eval
([
'mex -O LINKFLAGS="$LINKFLAGS /export:Static" '
basename
'_static.c '
basename
'_static_mex.c'
])
% Add /TP flag as fix for #1227
eval
([
'mex -O LINKFLAGS="$LINKFLAGS /export:Dynamic" /TP '
basename
'_dynamic.c '
basename
'_dynamic_mex.c'
])
eval
([
'mex -O LINKFLAGS="$LINKFLAGS /export:Static" /TP '
basename
'_static.c '
basename
'_static_mex.c'
])
elseif
strcmp
(
win_compiler
,
'cygwin'
)
% MATLAB/Windows + Cygwin g++
eval
([
'mex -O PRELINK_CMDS1="echo EXPORTS > mex.def & echo '
...
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment