jrouwe/JoltPhysics

Linker Failure: GetSubmergedVolume

Closed this issue · 2 comments

When compiling my program and linking to Jolt (jolt.lib), I get the following linker errors. I don't even call these functions, so it must be from some dependency chain inside of Jolt. Is there some special macro or preprocessor definition I'm missing?

To clarify, I'm not creating any custom collision shapes, and using release 4.0.2.

1>p_collision.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl JPH::ConvexShape::GetSubmergedVolume(class JPH::Mat44 const &,class JPH::Vec3,class JPH::Plane const &,float &,float &,class JPH::Vec3 &)const " (?GetSubmergedVolume@ConvexShape@JPH@@UEBAXAEBVMat44@2@VVec3@2@AEBVPlane@2@AEAM3AEAV42@@z)
1>p_collision.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl JPH::SphereShape::GetSubmergedVolume(class JPH::Mat44 const &,class JPH::Vec3,class JPH::Plane const &,float &,float &,class JPH::Vec3 &)const " (?GetSubmergedVolume@SphereShape@JPH@@UEBAXAEBVMat44@2@VVec3@2@AEBVPlane@2@AEAM3AEAV42@@z)

The JPH_DEBUG_RENDERER define mismatches between your project and how the Jolt library is compiled. Looks like your project doesn't have it and Jolt has.

Excellent, thank you. I did have it defined, but in one of my .h files and not in the compiler preprocessor definitions. Looks like that made the difference!