Closed ZeunO8 closed 1 year ago
Seems to be because of #include <X11/Xlib.h>
as Xlib defines a constant None
. I renamed the enum value at CollisionDispatch.h:43
to NONE and the build passes successfully
Hello. Thanks for reporting this but there is no issue in the ReactPhysics3D library because it correctly uses a namespace to avoid collision name. I will probably not change the name from NarrowPhaseAlgorithmType::None
to NarrowPhaseAlgorithmType::NONE
because Xlib does not protect the constant NONE inside a namespace. Moreover, if I change it to NONE it does not solve anything. What if another library has a NONE constant?
I wonder if the order of the includes (xlib and reactphysics3d) matters. Currently xlib is included first, if I put it after reactphysics3d it may work. Will test when I'm back home
Yup the order of Xlib / reactphysics3d matters. I included reactphysics3d before Xlib and all compiled successfully
Ok great it's a better "fix" I think. Thanks for the feedback.
I get the following errors when attempting to include reactphysics3d.h. This is using the latest master branch. Building with G++ 11.3.0 on Ubuntu 22.04.