New to bullet... How do i get it integrated into a project?

dwells254lb43
Posts: 10
Joined: Wed Jan 21, 2009 12:27 am

New to bullet... How do i get it integrated into a project?

Post by dwells254lb43 »

I am using Visual Studio 2005, and our junior project for our school is to make a space environment using the bullet physics engine. I think i have an idea on how to do everything, but i am getting alot of linking errors, and i was wondering what am i doing wrong while integrating the libraries into my visual studio.

We included the btBulletDynamicsCommon.h in the source file, and we included the Bullet /src path.
We included the libraries - libbulletdynamics, libbulletcollision, libbulletmath, this is all in the user manual on how to integrate the bullet physics in your application.

We are currently just trying to run something simple then build it without these linking errors. So we took the Hello World program out of the demos, we are trying to just get that to compile on our Visual Studio without the linkin errors however we are getting 26 linking errors while trying to do so..

Lnk2019 and Lnk2001 are the errors we are getting.

If anyone could please help us out with integrating this it would be very much appreciated

(sry this is written so sloppy lol).

Edited::

Obviously we are dumb!!! we are trying to add the .vcproj files of the dependencies listed above because we read in a previous file, but how do we link them, and where can they be found.. We were looking at the libbulletmath.vcproj files in the 8 folder.

Someone please help us link these things, and i am sorry that we are having such remedial issues, and im also sorry that i dont think im posting this in the correct place on this forum... :)
Dominik
Posts: 32
Joined: Fri Dec 19, 2008 2:51 pm

Re: New to bullet... How do i get it integrated into a project?

Post by Dominik »

To link stuff, you have to tell Visual Studio to use bullets .lib files.

This needs multiple steps:
1. Build the libraries.
For this, open Bullet/msvc/8/wksbullet.sln, and then build the lib projects you want.
Also, change the configuration you build with, at least use both debug and release.
2. Copy the libraries.
After building, you can find the .lib files in Bullet/out/(Config)/libs, its best to copy the needed files to Bullet/libs. Also, copy the .pdb files for those libraries, which you can find in Bullet/out/debug8/build/(ProjectName). The pdbs are used for debugging ;)
3. Add the libraries to your project.
Open the projects properties, go to linker->Input and add all bullet libraries to "additional dependencies". Do this for all of your project configurations. Depending on your onfiguration, add either the debug or release version of bullet.
4. Adding library search path
Open the project properties, go to linker->general, and add the bullet library path (the location where you copied the libs) to "additional Library Directories"

Should work now :)