From 7b0817a25e3814c1cce8981d98e825fe9cc8e0f5 Mon Sep 17 00:00:00 2001 From: Houtan Bastani Date: Fri, 14 Oct 2016 17:35:10 +0200 Subject: [PATCH] =?UTF-8?q?preprocessor:=20don=E2=80=99t=20need=20compiler?= =?UTF-8?q?=20argument=20to=20dynare=20when=20using=20octave.=20closes=20#?= =?UTF-8?q?1314?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ModFile.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ModFile.cc b/ModFile.cc index 25b518fc..79957925 100644 --- a/ModFile.cc +++ b/ModFile.cc @@ -756,7 +756,11 @@ ModFile::writeOutputFiles(const string &basename, bool clear_all, bool clear_glo // MATLAB/Windows + MinGW g++ mOutputFile << "dyn_mex('mingw', '" << basename << "', " << !check_model_changes << ")" << endl; else - mOutputFile << " error('When using the USE_DLL option, you must give the ''cygwin'', ''msvc'', or ''mingw'' option to the ''dynare'' command')" << endl; + mOutputFile << "if isoctave" << endl + << " dyn_mex('', '" << basename << "', " << !check_model_changes << ")" << endl + << "else" << endl + << " error('When using the USE_DLL option on Matlab, you must give the ''cygwin'', ''msvc'', or ''mingw'' option to the ''dynare'' command')" << endl + << "end" << endl; #else // other configurations mOutputFile << "dyn_mex('', '" << basename << "', " << !check_model_changes << ")" << endl;