You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ ./build/Release/jtest.exe
Version mismatch, make sure you compile the client code with the same Jolt version and compiler definitions!
Mismatching define JPH_FLOATING_POINT_EXCEPTIONS_ENABLED.
I believe the above error occurs when the client code doesn't have JPH_FLOATING_POINT_EXCEPTIONS_ENABLED defined, but the compiled library did have it enabled when it was compiled.
Note that we can reconcile this by creating this define, by doing: CMakeLists.txt
I spoke with the creator of joltphysics and he told me that this is expected behavior as the defines must match between the client code and whatever defines were used when joltphysics was built or else you get the "mismatched defines" error. Even though this is expected behavior it might be nice to either document this so that new users trying to use joltphysics from conan can get things working properly.
cuppajoeman
changed the title
[package] joltphysics/5.2.0: minimal working example doesn't work (Mismatching define or Segfault)
[package] joltphysics/5.2.0: minimal working example doesn't work out of the box
Feb 9, 2025
The JPH_FLOATING_POINT_EXCEPTIONS_ENABLED macro is controlled by the FLOATING_POINT_EXCEPTIONS_ENABLEDoption in Jolt's CMakeLists.txt which defaults to on,
so the conan recipe should define the macro as well when building with MSVC.
Description
Hi there,
I'm testing out the new joltphysics package, joltphysics provides a minimal hello world example here, when I create the following three files:
conanfile.txt
CMakeLists.txt
main.cpp
and then run
I get the following output:
I believe the above error occurs when the client code doesn't have
JPH_FLOATING_POINT_EXCEPTIONS_ENABLED
defined, but the compiled library did have it enabled when it was compiled.Note that we can reconcile this by creating this define, by doing:
CMakeLists.txt
I spoke with the creator of joltphysics and he told me that this is expected behavior as the defines must match between the client code and whatever defines were used when joltphysics was built or else you get the "mismatched defines" error. Even though this is expected behavior it might be nice to either document this so that new users trying to use joltphysics from conan can get things working properly.
Package and Environment Details
Conan profile
[settings]
arch=x86_64
build_type=Release
compiler=msvc
compiler.cppstd=20
compiler.runtime=dynamic
compiler.runtime_type=Release
compiler.version=194
os=Windows
Steps to reproduce
Follow the steps highlighted in the initial report.
Logs
No required logs currently.
The text was updated successfully, but these errors were encountered: