This page briefly documents how to configure MATLAB for Windows when a MEX compilation environment is required. Under Linux and MacOS, this configuration step is not necessary, because these operating systems already come with a working compilation environment (using g++).

Two compilers are currently supported: GNU C++ compiler (g++) from Cygwin, and Microsoft Visual C++ (MSVC).

With Dynare, you need a working MEX compilation environment in two cases:

/!\ For MATLAB 64-bit, the only supported compiler is MSVC

Configuring MATLAB with GNU C++ compiler (g++) from Cygwin

Configuring MATLAB with Microsoft Visual C++ (MSVC)

The following should work with recent versions of MATLAB: