Solution for LNK2019 error in GetSubmergedVolume #1030
Replies: 3 comments
-
I think you have to provide some more details on your build environment, like OS, compiler and either CMakeLists file or other building system script that you use. |
Beta Was this translation helpful? Give feedback.
-
This has been discussed before, e.g. #811 and #987. The correct fix for the problem is to ensure that you define the same macros as with which the Jolt library was compiled. In this case you need to define JPH_DEBUG_RENDERER in your own project or you need to link against the Distribution build to have it not defined for Jolt.lib. |
Beta Was this translation helpful? Give feedback.
-
I added this info to the documentation: https://github.com/jrouwe/JoltPhysics/blob/master/Build/README.md#link-error-unresolved-external-symbol |
Beta Was this translation helpful? Give feedback.
-
Hi there, I don't use github very often so this probably isn't the right way to go about it. I just wanted to report an issue I had with building and linking to the release 4.0.2 in my application. I'm modifying the hello world app, and got a LNK2019 error reported with JPH::ConvexShape::GetSubmergedVolume and JPH::SphereShape::GetSubmergedVolume. This appeared to be a result of the JPH_IF_DEBUG_RENDERER(, RVec3Arg inBaseOffset) macro being included in the declaration of both methods. I was able to solve this link error in my application by modifying Jolt/Core/Core.h and adding #undef JPH_DEBUG_RENDERER to the top of the file, which is suitable for my application since I am not using the debug renderer. Subsequently rebuilding Jolt.lib and building my application solved this linking error. I'm not sure if this is intended behaviour, but hopefully this helps someone. Cheers
Beta Was this translation helpful? Give feedback.
All reactions