Reputation: 423
Every time I open my project that contains bullet physics on a different computer I have to rebuild (with cmake) and re-link the bullet library. Is there anyway that I can fix this, I am currently using visual studio 2013. For example when linking the include files you can link from a relative path like ($SolutionDir)".
Thanks.
Upvotes: 0
Views: 1244
Reputation: 888
Could you provide more details about your problem? How do you link Bullet libraries to your project?
There are two ways to correctly use Bullet in your project.
Include Bullet source directly in your project and compile it as a part of your code. This way no linking is needed and there are no separate Bullet libraries.
Generate Bullet solution. Build it to obtain .lib
files. Copy .lib
files to your project lib directory, copy Bullet headers to your include directory. List Bullet libraries as Additional Dependencies
in Configuration Properties -> Linker -> Input
. Make sure that your include directory is specified in VC++ Directories -> Include Directories
and lib directory is mentioned in VC++ Directories -> Library Directories
. Remember not to write full paths. Instead use relative paths from your project directory. You don't have to use anything like ($SolutionDir)
.
Example paths:
Properties -> Linker -> Input -> Additional Dependencies : BulletCollision.lib
BulletDynamics.lib
BulletSoftBody.lib
LinearMath.lib
VC++ Directories -> Include Directories : include
VC++ Directories -> Library Directories : lib
Personally I prefer the second way provided you don't change anything in Bullet code.
Upvotes: 2