cmake fails

Anti-Distinctlyminty
Posts: 3
Joined: Tue Jan 04, 2011 4:51 pm

cmake fails

Post by Anti-Distinctlyminty »

Hi all,
Sorry if this has already been covered. I did look around for quite a while but didn't find anything.
I've followed the instructions here:
http://www.bulletphysics.org/mediawiki- ... om_scratch

And immediately ended up with this:
cmake.jpg
I'm assuming that Bullet depends upon OpenCL and DirectX? If so is there a certain version I should be downloading to use? Also, there seems to be a warning about OpenGL.
This is all very odd as all I've done is follow the instructions to the letter.

Any help would be very much appreciated.
You do not have the required permissions to view the files attached to this post.
Anti-Distinctlyminty
Posts: 3
Joined: Tue Jan 04, 2011 4:51 pm

Re: cmake fails

Post by Anti-Distinctlyminty »

Ok, even though my cmake results didn't seem to tally with the ones shown in the instructions I went ahead anyway and carried on with the example. With this code:

Code: Select all

#include "stdafx.h"
#include "btBulletDynamicsCommon.h"


int _tmain(int argc, _TCHAR* argv[])
{
	btBoxShape* box = new btBoxShape(btVector3(1,1,1));
	return 0;
}
I get a bunch of linker errors. The imported projects (BulletCollusion, BulletDynamics & LinearMath) all compile ok. I just can't use them because of the linker errors:

Code: Select all

Error	1	error LNK2019: unresolved external symbol "void * __cdecl btAlignedAllocInternal(unsigned int,int)" (?btAlignedAllocInternal@@YAPAXIH@Z) referenced in function "public: static void * __cdecl btConvexShape::operator new(unsigned int)" (??2btConvexShape@@SAPAXI@Z)	c:\develop\BulletTestApp\BulletTestApp\BulletTestApp.obj
Error	2	error LNK2019: unresolved external symbol "void __cdecl btAlignedFreeInternal(void *)" (?btAlignedFreeInternal@@YAXPAX@Z) referenced in function "public: static void __cdecl btConvexShape::operator delete(void *)" (??3btConvexShape@@SAXPAX@Z)	c:\develop\BulletTestApp\BulletTestApp\BulletTestApp.obj
Error	3	error LNK2019: unresolved external symbol "public: __thiscall btPolyhedralConvexShape::btPolyhedralConvexShape(void)" (??0btPolyhedralConvexShape@@QAE@XZ) referenced in function "public: __thiscall btBoxShape::btBoxShape(class btVector3 const &)" (??0btBoxShape@@QAE@ABVbtVector3@@@Z)	c:\develop\BulletTestApp\BulletTestApp\BulletTestApp.obj
Error	4	error LNK2001: unresolved external symbol "public: virtual void __thiscall btBoxShape::getAabb(class btTransform const &,class btVector3 &,class btVector3 &)const " (?getAabb@btBoxShape@@UBEXABVbtTransform@@AAVbtVector3@@1@Z)	c:\develop\BulletTestApp\BulletTestApp\BulletTestApp.obj
Error	5	error LNK2001: unresolved external symbol "public: virtual void __thiscall btCollisionShape::getBoundingSphere(class btVector3 &,float &)const " (?getBoundingSphere@btCollisionShape@@UBEXAAVbtVector3@@AAM@Z)	c:\develop\BulletTestApp\BulletTestApp\BulletTestApp.obj
Error	6	error LNK2001: unresolved external symbol "public: virtual float __thiscall btCollisionShape::getAngularMotionDisc(void)const " (?getAngularMotionDisc@btCollisionShape@@UBEMXZ)	c:\develop\BulletTestApp\BulletTestApp\BulletTestApp.obj
Error	7	error LNK2001: unresolved external symbol "public: virtual float __thiscall btCollisionShape::getContactBreakingThreshold(float)const " (?getContactBreakingThreshold@btCollisionShape@@UBEMM@Z)	c:\develop\BulletTestApp\BulletTestApp\BulletTestApp.obj
Error	8	error LNK2001: unresolved external symbol "public: virtual void __thiscall btBoxShape::calculateLocalInertia(float,class btVector3 &)const " (?calculateLocalInertia@btBoxShape@@UBEXMAAVbtVector3@@@Z)	c:\develop\BulletTestApp\BulletTestApp\BulletTestApp.obj
Error	9	error LNK2001: unresolved external symbol "public: virtual void __thiscall btCollisionShape::serializeSingleShape(class btSerializer *)const " (?serializeSingleShape@btCollisionShape@@UBEXPAVbtSerializer@@@Z)	c:\develop\BulletTestApp\BulletTestApp\BulletTestApp.obj
Error	10	error LNK2001: unresolved external symbol "public: virtual void __thiscall btConvexInternalShape::getAabbSlow(class btTransform const &,class btVector3 &,class btVector3 &)const " (?getAabbSlow@btConvexInternalShape@@UBEXABVbtTransform@@AAVbtVector3@@1@Z)	c:\develop\BulletTestApp\BulletTestApp\BulletTestApp.obj
Error	11	error LNK2019: unresolved external symbol "public: virtual char const * __thiscall btCollisionShape::serialize(void *,class btSerializer *)const " (?serialize@btCollisionShape@@UBEPBDPAXPAVbtSerializer@@@Z) referenced in function "public: virtual char const * __thiscall btConvexInternalShape::serialize(void *,class btSerializer *)const " (?serialize@btConvexInternalShape@@UBEPBDPAXPAVbtSerializer@@@Z)	c:\develop\BulletTestApp\BulletTestApp\BulletTestApp.obj
Error	12	error LNK2019: unresolved external symbol "public: virtual void __thiscall btConvexInternalShape::setLocalScaling(class btVector3 const &)" (?setLocalScaling@btConvexInternalShape@@UAEXABVbtVector3@@@Z) referenced in function "public: virtual void __thiscall btBoxShape::setLocalScaling(class btVector3 const &)" (?setLocalScaling@btBoxShape@@UAEXABVbtVector3@@@Z)	c:\develop\BulletTestApp\BulletTestApp\BulletTestApp.obj
Error	13	error LNK2019: unresolved external symbol "public: virtual __thiscall btConvexShape::~btConvexShape(void)" (??1btConvexShape@@UAE@XZ) referenced in function "public: virtual __thiscall btConvexInternalShape::~btConvexInternalShape(void)" (??1btConvexInternalShape@@UAE@XZ)	c:\develop\BulletTestApp\BulletTestApp\BulletTestApp.obj
Error	14	error LNK2001: unresolved external symbol "public: virtual class btVector3 __thiscall btConvexInternalShape::localGetSupportingVertex(class btVector3 const &)const " (?localGetSupportingVertex@btConvexInternalShape@@UBE?AVbtVector3@@ABV2@@Z)	c:\develop\BulletTestApp\BulletTestApp\BulletTestApp.obj
Error	15	error LNK1120: 14 unresolved externals	c:\develop\BulletTestApp\Debug\BulletTestApp.exe

Anti-Distinctlyminty
Posts: 3
Joined: Tue Jan 04, 2011 4:51 pm

Re: cmake fails

Post by Anti-Distinctlyminty »

Had to set
Linker>General>Additional Library Directories = C:\develop\tutorial\BulletBuild\lib\Debug;
and
Linker>General>Input = BulletCollision.lib;BulletDynamics.lib;LinearMath.lib + whatever was already there

Seems to compile now.
Not sure what I did differently from the instructions though...