Compilation using VC++ Wizard.
This is a tutorial which tells you how to use the ChronoEngineWizard in order to create a C++ project which uses the Chrono::Engine library. This represents the fastest way to start using the Chrono::Engine library.

Note that these instrunctions apply only to users of Microsoft Visual C++ (from v.8), because we will use the new 'wizard' which has been added to the Visual C++ IDE when you installed the Chrono::Engine SDK.

Follow the following steps.

1.c - Start the IDE
First of all, start the Microsoft Visual C++ IDE (version 8 or superior is required, as in the 'VC++ 2005 Express' edition), and go to the menu File / New / Project .. as in figure:



2.c - Start the ChronoEngineWizard
In the 'New Project' window, select the Visual C++ root, so you can see all types of available wizards. If the installation of Chrono::Engine has been successfully, you should see a custom wizard called ChronoEngineWizard, as in the fiure below.
Select that wizard and enter a directory in 'Location' and a name in the 'Name' field, then press the 'OK' button.



3.c - Wizard settings
Now you should see the window with the settings for the wizard:



(Note that, if things went ok during the installation of Chrono::Engine, these settings should already contain the correct paths of the directories of your Chrono::Engine SDK and your Irrlich SDK, so you should simply press the Finish button. Otherwise just press the '...' buttons and browse to the directory where you installed the SDK.)

Note: in case you uncheck the 'Use Irrlicht' button, a template project will be created anyway, but it will not use 3D visualization (it will be a very simple console program, with text output).

After you checked that the directories are correct, press the Finish button. THAT'S ALL! The project will be created in the location directory you specified!

4.c - Open the project
Now, to open the project, go to the directory where you created the project, on your disk.



Now double click on the '.sln' file (the Visual C++ 'solution'), so your Visual C++ IDE will open the contents of the project. Note that the Solution Explorer window (at the left of the screen) will show the template files contained in your project, for example try to double-click on the main.cpp source file, as in the picture below:



5.c - Set debugger directory
Now there is an optional, but strongly suggested step.
Use menu 'Project / Properties..', then select 'Configuration: All configurations', then go to the 'Debugging' section and enter $(OutDir) in the 'Working Directory' field; as in the figure below:



(This is necessary because, in this way, the current directory of the program, when launched by the debugger, will be the same where the .exe file is - this will avoid problems if the program must access relative paths).
6.c - Compile
To compile and execute the program, click on the green arrow on the toolbar (as in the picture below) or press F5.




Aftr few seconds of compilation, you should see the simulation of a pendulum with a spring:



THAT'S ALL!




NOTES

Back to the installation guide