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 (15)
  • Visual Studio 2017 Express Edition for Windows Desktop (15) - Note that this compiler only support compilin g 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 - 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 Professional 2017 (VS 15)
  • Visual Studio Enterprise 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:

The following compilers have been tested:

  • 32-bit MinGW, GCC version 4.8.1, 5.3 and 6.3
  • 64-bit MinGW, GCC version 4.9.2, 5.3 and 7.3

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 2020 runs on openSUSE Linux, 64-bit, with gcc version 4.8.5, 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.

Troubleshooting

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.