From ChronoWiki

(Redirected from Installation)
Jump to: navigation, search

In order to develop C++ applications based on the Chrono::Engine SDK, you must follow these instructions. Some steps are mandatory, other are only suggested.


File:Checkmark.png Check/Install a C++ compiler

Supported and tested compilers are:

  • Microsoft Visual C++ (professional and Express releases, both 64 and 32 bit)
  • MingW GNU C++ compiler for Windows
  • GNU C++ compiler for Linux-based platforms.

In case you do not have a C++ compiler, you can install it. There are some links to free C++ compilers in the Download page.

Note that other non listed compilers might work as well, but they might require some changes to the CMake scripts.

File:Checkmark.png Install CMake

The free CMake utility is used to setup the project building process. Please download and install CMake.

File:Checkmark.png Install the GIT

If you do not have a GIT client in your computer, you must install one. For example in Windows download and install SourceTree.

For more informations, see the GIT repository page.

File:Checkmark.png Download the project by cloning the GIT repository

Downlod the Chrono::Engine SDK by performing the clone of the GIT in a directory of your workstation. Assuming you are using SourceTree:

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

File:Checkmark.png Download the Irrlicht library

Please download the free Irrlicht Engine and unzip it in whatever directory.

Note. The default Irrlicht archive contains precompiled libraries for Windows 32 bit only. If you want to compile in 64 bit mode, follow these steps:

Building Irrlicht x64 (tested for Irrlicht 1.7.2)
Instructions are for VS2008 Professional

Open Irrlicht9.0.sln (in: \source\Irrlicht )
Create a new x64 Solution Platform
Change build mode to release-FastFPU

Open up the Irrlicht property page
under C/C++ -> Preprocessor change WIN32 to WIN64
under Linker -> General change ..\..\bin\Win32-visualstudio\Irrlicht.dll to ..\..\bin\Win64-visualstudio\Irrlicht.dll
under Linker -> Advanced change ..\..\lib\Win32-visualstudio\Irrlicht.lib to ..\..\lib\Win64-visualstudio\Irrlicht.lib
under Linker -> Command Line remove /MACHINE:I386

Disable DirextX (If only using OpenGL, DirectX SDK is needed Otherwise):
Open IrrCompileConfig.h
On line 121 comment out #define _IRR_COMPILE_WITH_DIRECT3D_9_

The project should now build properly

File:Checkmark.png Run CMake

Start the CMake tool and configure the build. In detail:

  1. In the field "Where is the source code" set the path to the directory /src (look in the directory where you created your GIT repository).
  2. In the field "Where to build the binaries" set the path to another directory in your system, that must be empty. Here the Visual C++ project will be created (or the makefiles if in Linux).
  3. Press the Configure button.
  4. Set the generator in the window that opens , and press Ok. (in this case select the Visual Studio 9, because in this example we will compile with Microsoft Visual C++)
  5. Change the settings in the user interface of CMake. Some of these settings are automatically detected, but some other must be changed.
    1. Deactivate the advanced units by removing the checkmarks from ENABLE_UNIT_JS, ENABLE_UNIT_MATLAB, ENABLE_UNIT_PYTHON, ENABLE_UNIT_TESTS, ENABLE_UNIT_CASCADE, because they might require additional settings and dependencies. More info on advanced units here.
    2. Press Configure.
    3. Set the directory in CH_IRRLICHTDIR, it must contain the path to your unzipped Irrlicht directory.
    4. Press Configure.
  6. Remember that you might need to press Configure after you change some setting, even multiple times.
  7. Finally, press Generate.

Now you just created a project to build Chrono::Engine. You can also close CMake.

File:Checkmark.png 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 'Release' or 'Debug' mode using the toggle in the toolbar.

Press F7 in the Visual Studio editor: the entire Chrono::Engine project and its demos will be compiled, creating many .exe and .dll files. This will take few minutes.

File:Checkmark.png Play with the demos

Where are the binaries that you compiled? Go to the directory that you set in "Where to build the binaries", go to bin/Release or bin/Debug directory, here you will find the demo_xxxxx.exe files that you can launch by double-clicking on them.

Note that the EXE demos with 3D visualization might not start, because Windows will tell you that the Irrlicht.dll is missing. If so, you have to manually copy the Irrlicht.dll from your Irrlicht \bin\Win32-VisualStudio directory (or \Win64-.. if you are on a 64 bit platform) into your ChronoEngine\bin\Win32_VisualStudio directory (or \Win64-.. if you are on a 64 bit platform).

Now you are ready: you can proceed and develop your programs based on Chrono::Engine.

Personal tools