Compiling Bullet v2.81 rev2613 under Windows 7 with Visual Studio

My project uses the Bullet physics engine together with the Ogre graphics engine, so the compilation of Bullet must be done with certain settings to properly build the final executable. These settings are, fast floting point and, the most important, DLL runtime of C/C++ (that is, /MD in release and /MDd in debug).

  1. You can download the latest version of Bullet and in the download section of the project’s code webpage.
  2. Open the CMake GUI and select the folder where you decompressed the source files using the “Browse Source” button. Select a folder where the library will be built with the “Browse Build” button.
  3. You can modify the options at your will, but I used the following:
    • BUILD_CPU_DEMOS
    • BUILD_DEMOS
    • BUILD_EXTRAS
    • BUILD_MULTITHREADING
    • USE_DX11
    • USE_GLUT
    • USE_GRAPHICAL_BENCHMARK
    • USE_MSVC_FAST_FLOATINGPOINT (as Ogre graphic engine does)
    • USE_MSVC_RUNTIME_LIBRARY_DLL (as Ogre graphic engine does)
    • USE_MSVC_SSE
    • In my CMake project, some libraries have a different name only in the debug configuration. Therefore, make sure that CMAKE_RELWITHDEBINFO_POSTFIX is empty.
    • Remove the MinSizeRel configuration if you are not using it.
  4. Configure and generate the project.
  5. Build it in MSVC and run some of the tests.
  6. You are now ready to include this library in your project together with Ogre.
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s