3
\$\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\$
2
  • \$\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
    Commented Mar 4, 2019 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\$
    – dlp_dev
    Commented Mar 5, 2019 at 10:32

1 Answer 1

3
\$\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\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .