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 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 (15)
  • Visual Studio 2017 Express Edition for Windows Desktop (15) - Note that this compiler only support compiling to Windows 32-bit executables.
  • Microsoft Build Tools 2017. Notes:
    • The minimum required selection to run Dymola is:
      • VC++ 2017 version highest listed latest version-number tools
      • C++/CLI support
    • Installing the above selection, no IDE (Integrated Development Environment) is installed, only command line features
    • This installation is not visible as a specific selection when later selecting the compiler in Dymola, the alternative to select is the same as for any other Visual Studio 2017 alternatives.
  • Visual Studio 2019 Community (16)
  • Microsoft Build Tools 2019 (see instructions on Installing and Testing Microsoft Build Tools).

Rights to use Visual Studio Community depend on the customer segment and usage scenarios; please check on Microsoft web site (see link below).

Visual Studio - Professional editions:

  • Visual Studio 2012 (11.0)
  • Visual Studio 2013 (12.0)
  • Visual Studio 2015 (14.0)
  • Visual Studio Professional 2017 (VS 15)
  • Visual Studio Enterprise 2017 (VS 15)
  • Visual Studio Professional 2019 (VS 16)
  • Visual Studio Enterprise 2019 (VS 16)

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.

Important: the support for Intel compilers will be discontinued in a future release.

OPC support

Note that OPC support has been removed in the Dymola 2021x release of Dymola. For alternative solutions please contact technical support.

GCC compilers:

The following compilers have been tested (later versions are usually compatible):

  • 32-bit MinGW, GCC version 5.3, 6.3, 8.2
  • 64-bit MinGW, GCC version 5.3, 7.3, 8.1

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 2021 runs on openSUSE Linux, 64-bit, with gcc version 5.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 executables. 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) when starting Dymola, a message will be displayed with a link to the compiler setup. The corresponding information is also 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. If needed, 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.