Compiler for System Modeling

The system modeling functionality uses a C++ compiler to build executables for fast simulation of models. Simulation of models requires the installation of a compiler on your computer. If a supported compiler is already installed, it will be automatically detected and used, and no further action has to be taken.

The commands in this tutorial depend on the system modeling functionality being loaded. Please evaluate the following input before any others in the tutorial.

Trigger loading of the system modeling functionality:

In[2]:=
Click for copyable input

Installation of Supported Compilers

Windows

On Windows, the functionality has been fully tested with and supports the following compilers:

Mac

Apple's Xcode needs to be installed. Xcode is available at the Mac App Store.

On Mac, SystemModeler has been fully tested with Clang from Xcode Version 6.2. It is likely that SystemModeler will work with any C++ compiler that is compatible with that version, i.e. any Clang from Xcode 6.2 from Apple Inc.

Instructions for installing are available here.

Linux

On Linux, the functionality has been fully tested with GCC/G++ 4.4 (32-bit and 64-bit). It is likely that SystemModeler will work with any C++ compiler that is compatible with that version, i.e. any GCC/G++ 4.4.

Instructions for installing are available here.

Compiler Verification and Configuration

This section describes the functionality available for verifying and changing the compiler settings. This is advanced functionality that most users will not need.

Verify the currently configured compiler.

In[3]:=
Click for copyable input
Out[3]=

If the verification is not successful, the result will also contain a log from a test compilation, indicating the problem with the configuration.

Show the currently selected compiler configuration.

In[4]:=
Click for copyable input
Out[4]=

The option is a list of rules specifying the compiler command, where it is found on the system, the version and advanced configuration options.

It is also possible to list all detected compilers that are supported.

In[5]:=
Click for copyable input
Out[5]=

Change the compiler configuration to use a different detected compiler.

In[6]:=
Click for copyable input
Out[6]=

Advanced Compiler Configuration

It is also possible to construct a custom compiler configuration by modifying individual configuration options.

Name
Description
"Command"name of the compiler
"Path"path to executable
"Version"compiler version
"PlatformSDKPath"path to Mac SDK
"TargetArchitecture"32- or 64-bit architecture
"UserFlags"custom compiler flags

Advanced compiler configuration options.

The "Command" describes the type of compiler and should be one of "g++", "clang++" or "cl".

The contents of the "Path" option are as follows for the supported compilers: