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 gcc).

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

With Dynare, you need a working MEX compilation environment if you want to use the USE_DLL option of model. In that case, you need to tell Dynare which compiler you are using:

dynare modfilename cygwin

dynare modfilename msvc

Configuring MATLAB with GNU C compiler (gcc) from Cygwin

Configuring MATLAB with Microsoft Visual C++ (MSVC)

The following should work with recent versions of MATLAB:

Configuring MATLAB releases before R2010a with Microsoft Visual C++ (MSVC)

Earlier versions of Matlab before R2010a do not support Visual Studio 2010: