Instructions for creating a Visual Studio project to run a SimTK core example program. Christopher Bruns, March 17, 2008 You must already have the SimTK core binaries installed from SimTK.org To use the visual studio solution file provided in this directory proceed to step 5). To create a new visual studio project for a SimTK example from scratch follow all steps: 1) Create new visual studio project based on an example source file: * In Visual Studio, select File->New->Project...->Visual C++->Win32->Win32 Console Application * Select a name for the new project, select a location, and select "Create new Solution" * Click "Next"; select "Console Application" and "Empty project" * Drag the desired example .cpp program into the "Source files" folder on the left. 2) Set up include directory * Far click the Project name on the left bar, select "Properties" * Set the "Configuration:" pulldown to "All Configurations" * Under Configuration Properties->C++->General select "Additional Include Directories" * Select the "..." button, then the new directory (folder) button * Browse to "C:/Program Files/SimTK/core/include", and add it to the "Additional Include Directories" section * Click "OK" 3) Set up library directories * Far click the Project name on the left bar, select "Properties" * Set the "Configuration:" pulldown to "All Configurations" * Under Configuration Properties->Linker->General select "Additional Library Directories" * Select the "..." button, then the new directory (folder) button * Add BOTH "C:/Program Files/SimTK/core/lib" and "C:/Program Files/SimTK/core/bin" to the "Additional Library Directories" section. * Click "OK" 4) Set up library names * Far click the Project name on the left bar, select "Properties" a) Debug versions * Set the "Configuration:" pulldown to "Debug" * Under Configuration Properties->Linker->Input select "Additional Dependencies" * Select the "..." button * Add the following library names: SimTKmolmodel_d.lib SimTKsimbody_d.lib SimTKmath_d.lib SimTKcpodes_d.lib SimTKcommon_d.lib SimTKlapack.lib SimTKsimbody_aux_d.lib * Click "Apply" a) Release versions * Set the "Configuration:" pulldown to "Release" * Under Configuration Properties->Linker->Input select "Additional Dependencies" * Select the "..." button * Add the following library names: SimTKmolmodel.lib SimTKsimbody.lib SimTKmath.lib SimTKcpodes.lib SimTKcommon.lib SimTKlapack.lib SimTKsimbody_aux.lib * Click "Apply" 5) Run the program * select "Release" configuration in the Visual Studio main toolbar (not "Debug", SimTK 1.5 does not have a debug release). * Type Ctrl-F5, or click Debug->"Start Without Debugging" * Your program should run * Type Ctrl-Break in the cmd.exe window to stop the program 6) To run another example program: * Delete the previous example .cpp file from the "Source Files" folder * Drag the new example .cpp file into the "Source Files" folder * Select "Release" configuration, Ctrl-F5, etc.