Setting up bullet

willcassella
Posts: 9
Joined: Sun Dec 01, 2013 6:53 am

Setting up bullet

Post by willcassella »

Hi! I've been working on writing my own game engine in c++, and as I started making games in the blender game engine many years ago, I thought it seemed fit to integrate the bullet physics engine into my own engine. I've been following the tutorial at http://bulletphysics.org/mediawiki-1.5. ... om_scratch (using visual studio 2012) but when I try to open the project dependencies window to add the bullet projects as dependencies of the main project, it tells me " The project file ' ' has been renamed or is no longer in the solution." This seems to happen with any bullet libraries I add. Is it an issue with visual studio 2012, or am I doing something incredibly stupid? Probably the latter.

Any help is appreciated,

Will Cassella
mdoug
Posts: 2
Joined: Mon Oct 28, 2013 11:23 am

Re: Setting up bullet

Post by mdoug »

Hi, I tend to think those instructions are outdated, but in any event they are a bit more involved than you need to just get up and running. To build with vs2012, just go into the build directory of bullet, and click on the "vs2010.bat" file, which should produce a vs2010 folder, which works in vs2012. Then, just go into that folder, open up the .sln file, and build it. Actually, you probably want to build it in Debug, and Release.

Then, in your project, just link against the appropriate libraries (i.e. debug in debug, release in release) in properties->linker->input that were built in the other project, add in the bullet directories to the additional linker directories in properties->linker->general, and add in the bullet include directories in the additional include directories in properties->C++->general.

Caveats:

Make sure everything is using the same runtime -- properties->C++->Code Generation->Runtime library.

This is not entirely adequate if you intend to be modifying the bullet source as you work on your engine, since it won't automatically rebuild the bullet library as you modify it. In that case, you will have to try to bring the bullet library project into your solution, which it covers in those directions. Personally, at that point, I think I would want to rearrange the directory structure though, since otherwise your project will be sprawling out across directories.

Anyhow, I did this myself not too long ago, and it wasn't terribly difficult, but somehow setting up VS projects is always tedious.
MaxDZ8
Posts: 149
Joined: Fri Jun 24, 2011 8:53 am

Re: Setting up bullet

Post by MaxDZ8 »

To compile in VC2012, I just converted the 2010 project file (or maybe the 2008)? No need to deal with .bat, no idea why it's even there.
I do recall having a similar problem (not with Bullet however): I had to manually open the xml solution file, somehow an invalid project descriptor got there and for some reason that specific conversion would fail systematically. It's probably because some odd dependency in terms of static linking, which instead goes converted into a project dependency.
Removing the project descriptor fixed the problem for me but I'll keep an eye on this thread as I'm interested.