Game Development Community

GMK Port Help

by raa brubb · in Torque 3D Professional · 04/13/2014 (12:54 am) · 9 replies

Hey all,

I've been redoing the GMK port to add more add ons to the package. I have run into what I believe is my last issue with the re-port. The last one was okay, but too buggy. I'm reporting it with light changes to the source code.

www.mediafire.com/convkey/00d2/ulsdymsc1rkhichfg.jpg
The screenshot is shown there.

physShapeSoftBullet.obj : error LNK2019: unresolved external symbol "public: void __thiscall btSoftRigidDynamicsWorld::addSoftBody(class btSoftBody *,short,short)" (?addSoftBody@btSoftRigidDynamicsWorld@@QAEXPAVbtSoftBody@@FF@Z) referenced in function "public: __thiscall PhysShapeSoftBullet::PhysShapeSoftBullet(class Physics *,struct PhysSoftInfo const &)" (??0PhysShapeSoftBullet@@QAE@PAVPhysics@@ABUPhysSoftInfo@@@Z)
1>physShapeSoftBullet.obj : error LNK2019: unresolved external symbol "public: void __thiscall btSoftBody::setMass(int,float)" (?setMass@btSoftBody@@QAEXHM@Z) referenced in function "public: __thiscall PhysShapeSoftBullet::PhysShapeSoftBullet(class Physics *,struct PhysSoftInfo const &)" (??0PhysShapeSoftBullet@@QAE@PAVPhysics@@ABUPhysSoftInfo@@@Z)
1>physShapeSoftBullet.obj : error LNK2019: unresolved external symbol "public: void __thiscall btSoftBody::setPose(bool,bool)" (?setPose@btSoftBody@@QAEX_N0@Z) referenced in function "public: __thiscall PhysShapeSoftBullet::PhysShapeSoftBullet(class Physics *,struct PhysSoftInfo const &)" (??0PhysShapeSoftBullet@@QAE@PAVPhysics@@ABUPhysSoftInfo@@@Z)
1>physShapeSoftBullet.obj : error LNK2019: unresolved external symbol "public: void __thiscall btSoftBody::randomizeConstraints(void)" (?randomizeConstraints@btSoftBody@@QAEXXZ) referenced in function "public: __thiscall PhysShapeSoftBullet::PhysShapeSoftBullet(class Physics *,struct PhysSoftInfo const &)" (??0PhysShapeSoftBullet@@QAE@PAVPhysics@@ABUPhysSoftInfo@@@Z)
1>physShapeSoftBullet.obj : error LNK2019: unresolved external symbol "public: void __thiscall btSoftBody::setTotalMass(float,bool)" (?setTotalMass@btSoftBody@@QAEXM_N@Z) referenced in function "public: __thiscall PhysShapeSoftBullet::PhysShapeSoftBullet(class Physics *,struct PhysSoftInfo const &)" (??0PhysShapeSoftBullet@@QAE@PAVPhysics@@ABUPhysSoftInfo@@@Z)
1>physShapeSoftBullet.obj : error LNK2019: unresolved external symbol "public: static class btSoftBody * __cdecl btSoftBodyHelpers::CreateFromTriMesh(struct btSoftBodyWorldInfo &,float const *,int const *,int,bool)" (?CreateFromTriMesh@btSoftBodyHelpers@@SAPAVbtSoftBody@@AAUbtSoftBodyWorldInfo@@PBMPBHH_N@Z) referenced in function "public: __thiscall PhysShapeSoftBullet::PhysShapeSoftBullet(class Physics *,struct PhysSoftInfo const &)" (??0PhysShapeSoftBullet@@QAE@PAVPhysics@@ABUPhysSoftInfo@@@Z)
1>physShapeSoftBullet.obj : error LNK2019: unresolved external symbol "public: void __thiscall btSoftRigidDynamicsWorld::removeSoftBody(class btSoftBody *)" (?removeSoftBody@btSoftRigidDynamicsWorld@@QAEXPAVbtSoftBody@@@Z) referenced in function "public: virtual __thiscall PhysShapeSoftBullet::~PhysShapeSoftBullet(void)" (??1PhysShapeSoftBullet@@UAE@XZ)
1>physShapeSoftBullet.obj : error LNK2019: unresolved external symbol "public: void __thiscall btSoftBody::updatePose(void)" (?updatePose@btSoftBody@@QAEXXZ) referenced in function "protected: virtual void __thiscall PhysShapeSoftBullet::setPhysicTransform(class MatrixF const &)" (?setPhysicTransform@PhysShapeSoftBullet@@MAEXABVMatrixF@@@Z)
1>physShapeSoftBullet.obj : error LNK2019: unresolved external symbol "public: void __thiscall btSoftBody::updateBounds(void)" (?updateBounds@btSoftBody@@QAEXXZ) referenced in function "protected: virtual void __thiscall PhysShapeSoftBullet::setPhysicTransform(class MatrixF const &)" (?setPhysicTransform@PhysShapeSoftBullet@@MAEXABVMatrixF@@@Z)
1>physShapeSoftBullet.obj : error LNK2019: unresolved external symbol "public: void __thiscall btSoftBody::updateNormals(void)" (?updateNormals@btSoftBody@@QAEXXZ) referenced in function "protected: virtual void __thiscall PhysShapeSoftBullet::setPhysicTransform(class MatrixF const &)" (?setPhysicTransform@PhysShapeSoftBullet@@MAEXABVMatrixF@@@Z)
1>physShapeSoftBullet.obj : error LNK2019: unresolved external symbol "public: void __thiscall btSoftBody::addForce(class btVector3 const &,int)" (?addForce@btSoftBody@@QAEXABVbtVector3@@H@Z) referenced in function "public: virtual void __thiscall PhysShapeSoftBullet::addForce(class Point3F const &,class Point3F const &)" (?addForce@PhysShapeSoftBullet@@UAEXABVPoint3F@@0@Z)
1>physShapeSoftBullet.obj : error LNK2019: unresolved external symbol "public: bool __thiscall btSoftBody::rayTest(class btVector3 const &,class btVector3 const &,struct btSoftBody::sRayCast &)" (?rayTest@btSoftBody@@QAE_NABVbtVector3@@0AAUsRayCast@1@@Z) referenced in function "public: virtual bool __thiscall PhysShapeSoftBullet::castRay(class Point3F const &,class Point3F const &,struct RayInfo *)" (?castRay@PhysShapeSoftBullet@@UAE_NABVPoint3F@@0PAURayInfo@@@Z)
1>../../../game/New Project_DEBUG.dll : fatal error LNK1120: 12 unresolved externals

This is simply the chicken scratch I got from Visual Studio. I have pinned it down to the header. I'm not quite sure what to do from here. Can anyone tell me what to do from here?

#1
04/13/2014 (7:42 am)
"Unresolved externals" - you're missing a library somewhere.
#2
04/13/2014 (8:49 am)
Which one? I'v never really had this problem with GMK.
#3
04/13/2014 (1:12 pm)
I don't know - where is public: void __thiscall btSoftRigidDynamicsWorld::addSoftBody(class btSoftBody *,short,short) defined? That's what's missing, along with all of those other things. Either a library is missing or you've missed a header somewhere. PhysX isn't my thing so I don't even know where to start.

Also, looking at the date there (2008) you may be looking at the old version of the PhysX SDK - if you're building against latest you're seeing the change in the API (those are no longer there). If that's the case you'll have to port it to the latest version of the PhysX SDK.
#4
04/13/2014 (1:51 pm)
Hi,

unresolved externals usually happens if you do not define the functions in your cpp file (in your case the physShapeSoftBullet.cpp) and you have declared them in a header file.

Also this may happen if you forgot to include the bullet lib/dll file that contains the definitions or even if the bullet headers/lib version does not match.
#5
04/13/2014 (4:17 pm)
Hi,

This is a bullet physics project. Do you want me to upload it? I cannot figure out how to get this thing working. I am sorry for the amount of help I'm asking for, after this, I will put in DX11 and OpenGL.
#6
04/15/2014 (7:09 pm)
Bump
#7
04/16/2014 (9:34 am)
Richard already has you pointed in the correct direction here to what's going on with your project.

You appear to be missing a library in your build, and it appears to be related to PhysX. seeing as they are all attached to physShapeSoftBullet.obj, my guess would either be one of two things.

1. You're using an outdated version of the library that is incompatible with T3D.

2. You're in debug build mode, and the library is set for release builds only.
#8
04/16/2014 (8:17 pm)
I tried compiling it as release yet it didn't fix the problem. This project is not at all related to PhysX. Its using bullet.

I don't know how to get the libraries included. I really need help.
#9
04/16/2014 (11:48 pm)
Step 1: Use Windows search feature and locate
libbullet.lib and libbullet_DEBUG.lib.
Step 2: Use the Visual Studio "HELP" to
learn how to link the library either
release or debug which ever one you are
going to build as.
Step 3: After adding the correct lib file
for bullet, do clean and build.