=Objectives and Overview= ---- This page describes how to compile DVC for Linux with GNU compilers or Windows with Visual Studio 2003 or newer. The instructions assume you have already [[Download_DVC_source_code |downloaded the DVC source code]]. [[toc]] =Satisfying library dependencies= ---- First install the required libraries. For a fully functional DVC application will will need all listed libraries. If you are in a rush, just get the first two. || __Dependency__ || __Requirement__ || __Instructions__ || __Description__ || || PATH Solver || **required** || [[PATH_MCP_Solver_installation_instructions|install instructions]] || PATH is used to solve time-stepping formulations when bodies are in contact. Without PATH, the dvc simulator can only handle bodies in freefall. || || Qt || **highly suggested** || [[qt_install_instructions|install instructions]] || Qt provides an advanced graphical user interface. Without Qt you will not be able to build the dvcQt application. || || SDL || optional || [[SDL_installation_instructions|install instructions]] || SDL is used to interface with mouse/keyboard and display hardware. SDL acts as a window manager and provides a canvas for OpenGL rendering. || || SDL_ttf || optional || [[SDL_ttf_installation_instructions |install instructions]] || SDL_ttf is used to render font. Helpful information is printed on screen and without SDL_ttf you will not be able to see it. || || GTKMM || optional || [[GTKMM_installation_instructions |install instructions]] || GTKMM provides an advanced graphical user interface. Without GTKMM you will not be able to modify simulator parameters on the fly. Only use GTKMM if you are using Visual Studio 2005. || =Configuration= ---- You will configure the build using CMake. If you don't have CMake installed, follow these instructions: * [[installing cmake|cmake install instructions]] Once you have CMake installed, follow these platform specific instructions: ===Windows=== Create a new folder to contain the build. You can place this folder anywhere. Next run CMake, usually found in Start --> Program Files --> CMake. Tell CMake where to find the dvc source folder and the dvc build folder: [[image:cmake_windows.png align="center"]] Press the 'Configure' button. Configuration is an iterative process, you may have to press 'Configure' a few times before all variables are set. If the USE_GUI option appears and you are not using Visual Studio 2005 then you must disable the option USE_GUI. For further information, see: * [[cmake variables]] When CMake is configured the 'OK' button will appear. Press 'OK' to generate Visual Studio files. ===Linux=== * Create a new directory to contain the build. * Change dir to the new build directory * Run CMake program 'ccmake' and on the command line tell it where to find the dvc source directory I usually place the build directory inside the source directory, like this: [[code]] cd dvc mkdir build cd build ccmake ../ [[code]] 'ccmake' is a curses based terminal program. It will look like this: [[image:cmake_curses.png align="center"]] Press 'c' to configure. Configuration is an iterative process, you may have to press 'c' a few times before all variables are set. For further information, see: * [[cmake variables]] When CMake is configured the generate option will appear. Press 'g' to generate makefiles. =Compiling= ---- When you have finished the configuration step, follow these platform specific instructions: ===Windows=== Open the build directory you created in the Configuration step. Open the dvc solution file //DVC.sln//. When Visual Studio opens the target **ALL_BUILD** will be selected by default. Go to the 'Build' menu and select 'Build ALL_BUILD'. Here are [[Executing_DVC_example_applications |instructions for running the example applications]]. ===Linux=== Use the makefiles, type: [[code]] make [[code]] Here are [[Executing_DVC_example_applications |instructions for running the example applications]].