Link error

Post Reply
JackR
Posts: 2
Joined: Sun Jun 12, 2016 5:42 pm

Link error

Post by JackR »

Hello, I've been trying to do a basic implementation of Bullet in a work-in-progress directX engine.

To resume, I have a projet which initiates all the needed Windows and DirectX goodies to which I added a PhysicsManager class,
which creates a btDiscreteDynamicsWorld and creates a few btCollisionShapes to be used when instantiating rigidbodies later on.

The whole thing is working fine in this project, everything compiles.

I then have an other project in the same solution, which just gets the Engine running (which also creates the PhysicsManager and world,etc.)
I keep getting an LNK2001 error in the 2nd project, saying it can't find the PhysicsManger class.

Projects specifics:

Engine:

- Compiled as Static Library
- Includes Bullet and directX 9 sdk (.h)
- References to Bullet3Collision, Bullet3Dynamics and LinearMath (all added to the solution as existing projects)
- Additional dependencies :
kernel32.lib
user32.lib
gdi32.lib
winspool.lib
shell32.lib
ole32.lib
oleaut32.lib
uuid.lib
comdlg32.lib
advapi32.lib
..\..\BulletBuild\lib\Debug\BulletDynamics_Debug.lib
..\..\BulletBuild\lib\Debug\BulletCollision_Debug.lib
..\..\BulletBuild\lib\Debug\LinearMath_Debug.lib

Second Project:

- Compiled as .exe
- Includes Bullet, DirectX sdk and Engine project (.h)
- References to Bullet3Collision, Bullet3Dynamics ,LinearMath and Engine
- Additional dependencies :
kernel32.lib
user32.lib
gdi32.lib
winspool.lib
shell32.lib
ole32.lib
oleaut32.lib
uuid.lib
comdlg32.lib
advapi32.lib
..\..\BulletBuild\lib\Debug\BulletDynamics_Debug.lib
..\..\BulletBuild\lib\Debug\BulletCollision_Debug.lib
..\..\BulletBuild\lib\Debug\LinearMath_Debug.lib

To specify, everything compiles until I call anything from the PhysicsManager class from the 2nd project.
Intelisense does see the PhysicsManager and it's methods from 2nd project tho.

Appart from being a singleton the PhysicsManager doesn't do anything fancy, I've pretty much just copied the HelloWorld example and made it into a separate class.

Any ideas appreciated, let me know if you need to see parts of the code.
benelot
Posts: 350
Joined: Sat Jul 04, 2015 10:33 am
Location: Bern, Switzerland
Contact:

Re: Link error

Post by benelot »

Apparently you solved the issue, because you have other questions posted. What did you do to solve it?
Post Reply