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:
    • USE_DX11
    • USE_GLUT
    • USE_MSVC_FAST_FLOATINGPOINT (as Ogre graphic engine does)
    • USE_MSVC_RUNTIME_LIBRARY_DLL (as Ogre graphic engine does)
    • 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.