Install Chrono

A summary of the process required to build Chrono is provided in the picture below.

1) Check/Install a C++ compiler

Recommended compilers:

  • Microsoft C++: Visual Studio from 2013 (free Community edition is fine, both 32 or 64 bit are ok)
  • MingW GNU C++ compiler for Windows
  • GNU C++ compiler for Linux-based platforms.

Other compilers could work as well, but they might require changes to the CMake scripts.

The initial release of Visual Studio 2015 gives an error compiling Chrono. Upgrade to update 2 to fix this problem.

2) Install CMake

The free CMake utility is used to manage the building process.

3) Install a GIT client

On Windows, you might want to download and install SourceTree. On Linux, there are several good options.

4) Download the project by cloning the Git repository

Download the Chrono SDK by performing a clone of the Git repository in a directory on your machine. Assuming you are using SourceTree:

  • press the Clone / New button in SourceTree
  • enter in the field "Source Path / URL"
  • enter a path to an empty directory, say C:/chrono_source, in the field "Destination path"
  • press Clone, and the source code will be downloaded to your directory.

5) Download the Irrlicht library

  • download Irrlicht Engine
  • unzip it in a directory of your choice. For example, here we suppose that you unzipped it in C:/engine_demos/irrlicht-1.8.2.
Click here for the direct download of the release v.1.8.2 of Irrlicht This release is tested to be stable and working well with Chrono. This is the recommended release. Release v.1.8.3 does not contain the precompiled 64bit dlls. Release v.1.8.0 has issues with soft shadows.

6) Run CMake

Start the CMake tool to configure the build.

  • In the field "Where is the source code" set the path to your Chrono directory. This is the directory where you created your Git repository, in our example is C:/chrono_source.
  • In the field "Where to build the binaries" set the path to another directory on your system, that must be empty. This is where the Visual C++ project will be created (or the makefiles, if on Linux). For our example, let's use C:/chrono_build,
  • Press the Configure button.
  • Set the compiler among the generators in the window that opens, and press Ok. If possible, choose a 64bit compiler.
  • Change the settings in the user interface of CMake. Some of these settings are automatically detected, but some other must be changed.
    • Activate the needed units with check-marks: at least click on ENABLE_MODULE_IRRLICHT, ENABLE_MODULE_POSTPROCESS. Other modules might require additional settings and dependencies.
    • Press Configure.
    • Set the directory in CH_IRRLICHTDIR: it must contain the path to the directory where you unzipped Irrlicht. In our example, browse to C:/engine_demos/irrlicht-1.8.2
    • Set the library in CH_IRRLICHTLIB: it must contain the file of the Irrlicht.lib. In our example, browse to C:/engine_demos/irrlicht-1.8.2/lib/Win64-visualStudio/Irrlicht.lib.
    • Press Configure.
  • Remember that you might need to press Configure after you change some setting, even multiple times, until all the labels do not have a red background any longer.
  • Finally, press Generate. At this point you just finished creating a project to build Chrono. You can close CMake.

7) Compile the project

  • Go to the directory that you set in "Where to build the binaries". You will find a file ChronoEngine.sln
  • Double-click on that file: your Visual Studio project will open.
  • Choose 'Debug' mode using the dropbox in the toolbar.
  • Use the menu BUILD / Build solution... in the Visual Studio editor. The entire Chrono project and its demos will be compiled, creating many .exe and .dll files in the bin/Debug directory. This will take a few minutes.
  • Choose 'Release' mode using the dropbox in the toolbar.
  1. Use again the menu BUILD / Build solution... in the Visual Studio editor. The entire Chrono project and its demos will be compiled, creating many .exe and .dll files, this time in the bin/Release directory. This will take a few minutes.

8) Take the demos for a ride!

Go to the directory that you set in "Where to build the binaries", in our case C:/chrono_build, then go to bin/Release or bin/Debug directory. There you will find the demo_xxxxx.exe files that you can launch by double-clicking on them.

It could happen that demos using 3D visualization might not start. This could happen if the Irrlicht.dll is missing. You have to manually copy the Irrlicht.dll from your Irrlicht -VisualStudio directory (or -.. if you are on a 32 bit platform) into your ChronoEngine directory (or -.. if you are on a 32 bit platform).
IMPORTANT: never mix 64bit and 32bit binaries and libraries! For example, if you built Chrono in 64 bit, using a 64bit compiler, you must link the 64bit Irrlicht library.