From 781e10c24bd9d29a75e09255f761a42fc1a1388b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=A9bastien=20Villemot?= <sebastien@dynare.org>
Date: Fri, 14 Oct 2022 15:40:09 +0200
Subject: [PATCH] =?UTF-8?q?Error=20out=20if=20=E2=80=9Cuse=5Fdll=E2=80=9D?=
 =?UTF-8?q?=20is=20specified=20in=20Julia=20mode?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 src/DynareMain.cc | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/DynareMain.cc b/src/DynareMain.cc
index 5abdb522..c1cf3eae 100644
--- a/src/DynareMain.cc
+++ b/src/DynareMain.cc
@@ -496,6 +496,12 @@ main(int argc, char **argv)
   if (use_dll)
     mod_file->use_dll = true;
 
+  if (mod_file->use_dll && language == LanguageOutputType::julia)
+    {
+      cerr << "ERROR: `use_dll` option is not compatible with Julia" << endl;
+      exit(EXIT_FAILURE);
+    }
+
   if (mod_file->use_dll)
     ModelTree::initializeMEXCompilationWorkers(max(jthread::hardware_concurrency(), 1U));
 
-- 
GitLab