Dynare Reference Manual: Compiler installation

Next: Configuration, Previous: Installation of Dynare, Up: Installation and configuration [Contents][Index]

### 2.3 Compiler installation

If you plan to use the `use_dll` option of the `model` command, you will need to install the necessary requirements for compiling MEX files on your machine.

If you are using MATLAB, please check http://www.mathworks.com/support/compilers for supported compilers for your MATLAB version on your operating system. After installing your compiler, select it using `mex -setup` in Matlab and clicking on the required compiler.

Octave comes with built-in functionality for compiling mex-files.

Next: Prerequisites on Debian GNU/Linux and Ubuntu, Up: Compiler installation [Contents][Index]

#### 2.3.1 Prerequisites on Windows

If you are using MATLAB under Windows, install a C++ compiler on your machine and configure it with MATLAB. There are at least two free compilers you can use. First, there is Microsoft’s Visual Studio Community (https://www.visualstudio.com/), which has the largest history of MATLAB support, but requires much space on the hard-disk. Second, since MATLAB R2015b, MATLAB supports the MinGW-w64 C/C++ Compiler from TDM-GCC. To install this compiler, use the Add-Ons menu of MATLAB. Search for MinGW or select it from Features.

For older version of MATLAB, in particular before R2014a, it may sometimes make sense to use the gcc compiler provided by Cygwin. However, integrating it in MATLAB can be quite cumbersome and should be considered as a legacy option. For details, see instructions on the Dynare wiki.

Next: Prerequisites on macOS, Previous: Prerequisites on Windows, Up: Compiler installation [Contents][Index]

#### 2.3.2 Prerequisites on Debian GNU/Linux and Ubuntu

Users of MATLAB under Linux need to have a working compilation environment installed. If not already present, it can be installed via `apt-get install build-essential`.

Users of Octave under Linux should install the package for MEX file compilation (under Debian or Ubuntu, it is called `liboctave-dev`).

Previous: Prerequisites on Debian GNU/Linux and Ubuntu, Up: Compiler installation [Contents][Index]

#### 2.3.3 Prerequisites on macOS

If you are using MATLAB under macOS, you should install the latest version of XCode: see instructions on the Dynare wiki.

Previous: Prerequisites on Debian GNU/Linux and Ubuntu, Up: Compiler installation [Contents][Index]