Skip to content
Andres Traks edited this page Oct 22, 2019 · 12 revisions

Prerequisites

  • CMake
  • Microsoft Visual C++ 2015-2017

Note that C++ build tools aren't installed for Visual Studio 2015 by default.

Instructions

  1. Fetch Bullet and BulletSharp:
  1. Generate Bullet solution files with CMake-gui. Set the build directory to:
  • bullet3/msvc/2015 for "Visual Studio 14 2015"
  • bullet3/msvc/2017 for "Visual Studio 15 2017"

Set the USE_MSVC_RUNTIME_LIBRARY_DLL option. You can clear all BUILD_X options like BUILD_BULLET2_DEMOS, BUILD_CPU_DEMOS, etc., except BUILD_EXTRAS.

2a. Optional: to use double precision, select USE_DOUBLE_PRECISION in CMake, then go to BulletSharp/src/Stdaxh.h and uncomment the following line:

  //#define BT_USE_DOUBLE_PRECISION

2b. Optional: to enable multi-threading, select BULLET2_MULTITHREADING, press "Configure" and then select one or more of BULLET2_USE_OPEN_MP_MULTITHREADING, BULLET2_USE_PPL_MULTITHREADING and BULLET2_USE_TBB_MULTITHREADING. MSVC supports OpenMP and PPL out-of-the-box.

  1. Open bullet3/msvc/20xx/BULLET_PHYSICS.sln and build the Release configuration.

  2. Open BulletSharp/BulletSharp.sln (or BulletSharp/(vs20xx/)BulletSharp.sln) and select the build configuration for your graphics framework. BulletSharp will use the Vector and Matrix classes from it. If the framework is not listed or you do not need one, then select the Generic configuration, which includes its own Vector/Matrix classes. You may need to adjust library paths in project properties -> Configuration Properties -> C/C++ -> Resolve #using References. Build the solution.

Instructions for x64

The process is the same, except:

  • for Bullet, select the "Visual Studio xx Win64" generator in CMake,
  • for BulletSharp, select the x64 solution platform in Configuration Manager.
Clone this wiki locally