[JoltPhysics] Allow option to compile with rtti enabled, or make it default #42847
Labels
category:port-feature
The issue is with a library, which is requesting new capabilities that didn’t exist
Is your feature request related to a problem? Please describe.
Yes, I am currently unable to compile my project with Jolt in its current state.
Proposed solution
See discussion with Jolt's owner here. His suggestion was to go here and "Just add something along the lines rtti_enabled CPP_RTTI_ENABLED to that code block." Alternatively the default could be changed to enable rtti.
Describe alternatives you've considered
No other alternatives while still using vcpkg
Additional context
Copy pasted from the thread with the owner:
Question: Hello, my project compiles fine when running the sample Hello World file, but I'm currently in the process of implementing a debug renderer and I'm getting the following error:
I'm using macOS Sonoma 14.4.1, in a VS Code project. Jolt is integrated via vcpkg/CMake with vcpkg install joltphysics[core,debugrenderer,profiler], so the debug renderer should be included there. I ran nm -gC path/to/libJolt.a | grep DebugRenderer and there were a lot of finds, maybe there's somehow no definition for it though. I'm not positive where to go from here. As mentioned, the default parts of the library are building and linking just fine.
Answer: Jolt by default compiles without C++ RTTI, your project is compiling with RTTI. Either turn it off for your own project or turn it on for Jolt using the CPP_RTTI_ENABLED cmake option.
I'm not the maintainer of the vcpkg, but looking at the vcpkg repository:
vcpkg/ports/joltphysics/portfile.cmake
Lines 13 to 17 in ff8d715
it is not exposed.
Exposing it should be trivial though. Just add something along the lines rtti_enabled CPP_RTTI_ENABLED to that code block and send a PR to microsoft.
The text was updated successfully, but these errors were encountered: