From 8bb8e59410c91a44497ce5f5f5575e52c114da2e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=A9bastien=20Villemot?= <sebastien@dynare.org>
Date: Fri, 8 Oct 2021 12:59:17 +0200
Subject: [PATCH] Improve message for GCC installation under macOS

---
 src/ModelTree.cc | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/ModelTree.cc b/src/ModelTree.cc
index 68da7572..c6216131 100644
--- a/src/ModelTree.cc
+++ b/src/ModelTree.cc
@@ -1899,7 +1899,8 @@ ModelTree::matlab_arch(const string &mexext)
 string
 ModelTree::findGccOnMacos()
 {
-  const string macos_gcc_version{"11"};
+  const string macos_gcc_version{"11"}; // doc/manual/source/installation-and-configuration.rst
+                                        // should be updated when this is changed
   char dynare_preprocessor_path[PATH_MAX];
   uint32_t size = PATH_MAX;
   string local_gcc_path;
@@ -1918,7 +1919,7 @@ ModelTree::findGccOnMacos()
     {
       cerr << "ERROR: You must install gcc-" << macos_gcc_version
            << " on your system before using the `use_dll` option of Dynare. "
-           << "You can do this via the Dynare installation package." << endl;
+           << "If using MATLAB, you can do this via the Dynare installation package. If using Octave, you should run `brew install gcc-" << macos_gcc_version << "` in a terminal." << endl;
       exit(EXIT_FAILURE);
     }
 }
-- 
GitLab