C Compiler

To translate models in Dymola you must install a supported C compiler. The C compiler is not distributed with Dymola. The C compiler needs to be installed only once, even if you install multiple versions of Dymola.

C Compilers on Windows

Visual Studio - Free editions:

  • Visual Studio 2008 Express Edition (9.0)
  • Visual C++ 2010 Express (10.0)
  • Visual Studio 2012 Express Edition (11.0)
  • Visual Studio 2013 Express for Windows Desktop Edition (12.0)
  • Visual Studio 2015 Express Edition for Windows Desktop (14.0)
  • Visual Studio 2017 Community Edition and Visual Studio 2017 Express Edition for Windows Desktop (15)

Visual Studio - Professional editions:

  • Visual Studio 2005 (8.0)
  • Visual Studio 2008 (9.0)
  • Visual Studio 2010 (10.0)
  • Visual Studio 2012 (11.0)
  • Visual Studio 2013 (12.0)
  • Visual Studio 2015 (14.0)
  • Visual Studio 2017 (VS 15)

Below is the download link for the Visual Studio compiler.

Intel compiler:

  • Intel Parallel Studio XE 2016
  • Intel Parallel Studio XE 2017
  • Intel Parallel Studio XE 2018

Note – the Intel compiler also demands a Visual Studio compiler, and has some limitations; Click here for more details and find below the download link.

GCC compilers:

  • 32-bit MinGW, with a GCC version compatible with 4.8.1.
  • 64-bit MinGW, with a GCC version compatible with 4.9.2.

Note – the GCC compilers have some limitations, and demand for add-ons during installation etc. Click here for more details and find below the download link.

Installing a C Compiler on Windows

Please note that for the Windows platform, a C/C++ compiler must be installed separately. The C compiler can be installed before or after you install Dymola. You can run Dymola and browse models, but to translate any model you must install the C compiler. To change the compiler Dymola uses to translate the model, use the command Simulation > Setup... and the Compiler tab. (To the right is an example of the Compiler tab).

The selected compiler is stored as a per user setting and for the future kept for new installations of Dymola.

C Compilers on Linux

On Linux systems the default compiler is used. The compilation is controlled by the shell script insert/dsbuild.sh. Dymola 2017 runs on SUSE Linux (Release 11), 32-bit and 64-bit, with gcc version 4.9.3, and compatible systems. In addition to gcc, the model C code can also be compiled by clang.

For instructions on how to change compiler, and further notes, click here.


Compiler check and error coding

The compiler that is used to compile the C code generated by Dymola into executable code for simulation is set
in the Compiler tab using the command Simulation > Setup… (see above).
Some potential problems can be found by pressing the Test compiler button. A small Modelica program is compiled
and executed to test the compiler, both for 32 and 64 bit Dymola. Messages will be displayed on success or failure.
Any warning messages indicate problems that need to be resolved before translating a model. Error messages with
information how to proceed (including a link to this web page) will be displayed, e. g. when no compiler is
selected. If no compiler has been selected (or installed), the corresponding information will also be displayed
in the command log.

Dymola on Windows

Note that Visual Studio performs parts of its installation the first time it is run. This must be performed in
order to use Visual Studio with Dymola, a step that requires administrator privileges. The rights can be elevated
by running Dymola as administrator the first time. This is done by right-clicking the Dymola icon in the Windows
Start menu and selecting Run as administrator.

To validate this, any model (e. g. a demo) should be opened and translated in Dymola.