0
\$\begingroup\$

I've been following the BulletQuickstart guide and I get as far as generating the vs2010 solution and converting to newer. I've also been following this very good answer from a few years ago and have included the src folder into my project.

The only thing that remains is to link the libraries after building the bullet solution but I'm not entirely sure which ones are the correct ones to use. I've tried:

  • Linking against Bullet3Collision.lib, Bullet3Dynamics.lib and LinearMath.lib
  • Linking against BulletCollision.lib, BulletDynamics.lib and LinearMath.lib
  • Same as the above options, but with original filenames i.e. BulletCollision_vs2010_debug etc.

In every instance I get the usual errors when not linking properly:

 unresolved external symbol "void * __cdecl btAlignedAllocInternal.......

I have already checked the Additional Library Directories and Additional Dependencies

The small code I have calling some bullet stuff is:

#pragma once

#include "btBulletDynamicsCommon.h"
#include <stdio.h>

class BTPhysics
{
public:
    BTPhysics();
    ~BTPhysics();

    void Init();

private:
    btDefaultCollisionConfiguration* m_pCollisionConfiguration;
    btCollisionDispatcher* m_pDispatcher;
    btBroadphaseInterface* m_pOverlappingPairCache;
    btSequentialImpulseConstraintSolver* m_pSolver;
    btDiscreteDynamicsWorld* m_pDynamicsWorld;
};

Am I supposed to grab the library files from somewhere else other than the bin directory after building the bullet3 solution?

\$\endgroup\$
  • \$\begingroup\$ Is there a btCommon lib that you're missing? Otherwise, are you building bullet and your game with the same version of VS and the same target settings? \$\endgroup\$ – Jay Mar 4 at 23:15
  • \$\begingroup\$ @Jay I added the Bullet3Common.lib but no dice. Yes, they are all being build with the same VS and targets. \$\endgroup\$ – DLPDev Mar 5 at 10:32
2
\$\begingroup\$

After looking further into the differences between the Bullet libraries and my own project turns out the runtime libraries were different. Multi-threaded Debug (/MTd) is the default after building Bullet. Changed it to Multi-threaded Debug DLL (/MDd) and it works fine!

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.