DanielChappuis / reactphysics3d

Open source C++ physics engine library in 3D
http://www.reactphysics3d.com
zlib License
1.54k stars 223 forks source link

Build errors when including reactphysics3d header #311

Closed ZeunO8 closed 1 year ago

ZeunO8 commented 1 year ago

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.

/home/saeun/Projects/coje/venjor/reactphysics3d/include/reactphysics3d/collision/narrowphase/CollisionDispatch.h:43:5: error: expected identifier before numeric constant
   43 |     None,
      |     ^~~~
/home/saeun/Projects/coje/venjor/reactphysics3d/include/reactphysics3d/collision/narrowphase/CollisionDispatch.h:43:5: error: expected ‘}’ before numeric constant
In file included from /home/saeun/Projects/coje/venjor/reactphysics3d/include/reactphysics3d/collision/narrowphase/NarrowPhaseInput.h:32,
                 from /home/saeun/Projects/coje/venjor/reactphysics3d/include/reactphysics3d/systems/CollisionDetectionSystem.h:40,
                 from /home/saeun/Projects/coje/venjor/reactphysics3d/include/reactphysics3d/engine/PhysicsWorld.h:49,
                 from /home/saeun/Projects/coje/venjor/reactphysics3d/include/reactphysics3d/engine/PhysicsCommon.h:31,
                 from /home/saeun/Projects/coje/venjor/reactphysics3d/include/reactphysics3d/reactphysics3d.h:42,
                 from /home/saeun/Projects/coje/include/coje/Instance.hpp:56,
                 from /home/saeun/Projects/coje/include/coje/Animator.hpp:5,
                 from /home/saeun/Projects/coje/src/Animator.cpp:3:
/home/saeun/Projects/coje/venjor/reactphysics3d/include/reactphysics3d/collision/narrowphase/CollisionDispatch.h:42:37: note: to match this ‘{’
   42 | enum class NarrowPhaseAlgorithmType {
      |                                     ^
In file included from /usr/include/X11/Xlib.h:44,
                 from /home/saeun/Projects/coje/include/coje/Instance.hpp:32,
                 from /home/saeun/Projects/coje/include/coje/Animator.hpp:5,
                 from /home/saeun/Projects/coje/src/Animator.cpp:3:
/home/saeun/Projects/coje/venjor/reactphysics3d/include/reactphysics3d/collision/narrowphase/CollisionDispatch.h:43:5: error: expected unqualified-id before numeric constant
   43 |     None,
      |     ^~~~
In file included from /home/saeun/Projects/coje/venjor/reactphysics3d/include/reactphysics3d/collision/narrowphase/NarrowPhaseInput.h:32,
                 from /home/saeun/Projects/coje/venjor/reactphysics3d/include/reactphysics3d/systems/CollisionDetectionSystem.h:40,
                 from /home/saeun/Projects/coje/venjor/reactphysics3d/include/reactphysics3d/engine/PhysicsWorld.h:49,
                 from /home/saeun/Projects/coje/venjor/reactphysics3d/include/reactphysics3d/engine/PhysicsCommon.h:31,
                 from /home/saeun/Projects/coje/venjor/reactphysics3d/include/reactphysics3d/reactphysics3d.h:42,
                 from /home/saeun/Projects/coje/include/coje/Instance.hpp:56,
                 from /home/saeun/Projects/coje/include/coje/Animator.hpp:5,
                 from /home/saeun/Projects/coje/src/Animator.cpp:3:
/home/saeun/Projects/coje/venjor/reactphysics3d/include/reactphysics3d/collision/narrowphase/CollisionDispatch.h:63:9: error: ‘MemoryAllocator’ does not name a type
   63 |         MemoryAllocator& mAllocator;
      |         ^~~~~~~~~~~~~~~
/home/saeun/Projects/coje/venjor/reactphysics3d/include/reactphysics3d/collision/narrowphase/CollisionDispatch.h:84:9: error: ‘SphereVsSphereAlgorithm’ does not name a type
   84 |         SphereVsSphereAlgorithm* mSphereVsSphereAlgorithm;
      |         ^~~~~~~~~~~~~~~~~~~~~~~
/home/saeun/Projects/coje/venjor/reactphysics3d/include/reactphysics3d/collision/narrowphase/CollisionDispatch.h:87:9: error: ‘CapsuleVsCapsuleAlgorithm’ does not name a type
   87 |         CapsuleVsCapsuleAlgorithm* mCapsuleVsCapsuleAlgorithm;
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~
/home/saeun/Projects/coje/venjor/reactphysics3d/include/reactphysics3d/collision/narrowphase/CollisionDispatch.h:90:9: error: ‘SphereVsCapsuleAlgorithm’ does not name a type
   90 |         SphereVsCapsuleAlgorithm* mSphereVsCapsuleAlgorithm;
      |         ^~~~~~~~~~~~~~~~~~~~~~~~
/home/saeun/Projects/coje/venjor/reactphysics3d/include/reactphysics3d/collision/narrowphase/CollisionDispatch.h:93:9: error: ‘SphereVsConvexPolyhedronAlgorithm’ does not name a type
   93 |         SphereVsConvexPolyhedronAlgorithm* mSphereVsConvexPolyhedronAlgorithm;
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/saeun/Projects/coje/venjor/reactphysics3d/include/reactphysics3d/collision/narrowphase/CollisionDispatch.h:96:9: error: ‘CapsuleVsConvexPolyhedronAlgorithm’ does not name a type
   96 |         CapsuleVsConvexPolyhedronAlgorithm* mCapsuleVsConvexPolyhedronAlgorithm;
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/saeun/Projects/coje/venjor/reactphysics3d/include/reactphysics3d/collision/narrowphase/CollisionDispatch.h:99:9: error: ‘ConvexPolyhedronVsConvexPolyhedronAlgorithm’ does not name a type
   99 |         ConvexPolyhedronVsConvexPolyhedronAlgorithm* mConvexPolyhedronVsConvexPolyhedronAlgorithm;
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/saeun/Projects/coje/venjor/reactphysics3d/include/reactphysics3d/collision/narrowphase/CollisionDispatch.h:102:9: error: ‘NarrowPhaseAlgorithmType’ does not name a type
  102 |         NarrowPhaseAlgorithmType mCollisionMatrix[NB_COLLISION_SHAPE_TYPES][NB_COLLISION_SHAPE_TYPES];
      |         ^~~~~~~~~~~~~~~~~~~~~~~~
/home/saeun/Projects/coje/venjor/reactphysics3d/include/reactphysics3d/collision/narrowphase/CollisionDispatch.h:106:9: error: ‘NarrowPhaseAlgorithmType’ does not name a type
  106 |         NarrowPhaseAlgorithmType selectAlgorithm(int type1, int type2);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~
/home/saeun/Projects/coje/venjor/reactphysics3d/include/reactphysics3d/collision/narrowphase/CollisionDispatch.h:118:42: error: expected ‘)’ before ‘&’ token
  118 |         CollisionDispatch(MemoryAllocator& allocator);
      |                          ~               ^
      |                                          )
/home/saeun/Projects/coje/venjor/reactphysics3d/include/reactphysics3d/collision/narrowphase/CollisionDispatch.h:124:41: error: ‘SphereVsSphereAlgorithm’ has not been declared
  124 |         void setSphereVsSphereAlgorithm(SphereVsSphereAlgorithm* algorithm);
      |                                         ^~~~~~~~~~~~~~~~~~~~~~~
/home/saeun/Projects/coje/venjor/reactphysics3d/include/reactphysics3d/collision/narrowphase/CollisionDispatch.h:127:9: error: ‘SphereVsSphereAlgorithm’ does not name a type
  127 |         SphereVsSphereAlgorithm* getSphereVsSphereAlgorithm();
      |         ^~~~~~~~~~~~~~~~~~~~~~~
/home/saeun/Projects/coje/venjor/reactphysics3d/include/reactphysics3d/collision/narrowphase/CollisionDispatch.h:130:42: error: ‘SphereVsCapsuleAlgorithm’ has not been declared
  130 |         void setSphereVsCapsuleAlgorithm(SphereVsCapsuleAlgorithm* algorithm);
      |                                          ^~~~~~~~~~~~~~~~~~~~~~~~
/home/saeun/Projects/coje/venjor/reactphysics3d/include/reactphysics3d/collision/narrowphase/CollisionDispatch.h:133:9: error: ‘SphereVsCapsuleAlgorithm’ does not name a type
  133 |         SphereVsCapsuleAlgorithm* getSphereVsCapsuleAlgorithm();
      |         ^~~~~~~~~~~~~~~~~~~~~~~~
/home/saeun/Projects/coje/venjor/reactphysics3d/include/reactphysics3d/collision/narrowphase/CollisionDispatch.h:136:43: error: ‘CapsuleVsCapsuleAlgorithm’ has not been declared
  136 |         void setCapsuleVsCapsuleAlgorithm(CapsuleVsCapsuleAlgorithm* algorithm);
      |                                           ^~~~~~~~~~~~~~~~~~~~~~~~~
/home/saeun/Projects/coje/venjor/reactphysics3d/include/reactphysics3d/collision/narrowphase/CollisionDispatch.h:139:9: error: ‘CapsuleVsCapsuleAlgorithm’ does not name a type
  139 |         CapsuleVsCapsuleAlgorithm* getCapsuleVsCapsuleAlgorithm();
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~
/home/saeun/Projects/coje/venjor/reactphysics3d/include/reactphysics3d/collision/narrowphase/CollisionDispatch.h:142:51: error: ‘SphereVsConvexPolyhedronAlgorithm’ has not been declared
  142 |         void setSphereVsConvexPolyhedronAlgorithm(SphereVsConvexPolyhedronAlgorithm* algorithm);
      |                                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/saeun/Projects/coje/venjor/reactphysics3d/include/reactphysics3d/collision/narrowphase/CollisionDispatch.h:145:9: error: ‘SphereVsConvexPolyhedronAlgorithm’ does not name a type
  145 |         SphereVsConvexPolyhedronAlgorithm* getSphereVsConvexPolyhedronAlgorithm();
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/saeun/Projects/coje/venjor/reactphysics3d/include/reactphysics3d/collision/narrowphase/CollisionDispatch.h:148:52: error: ‘CapsuleVsConvexPolyhedronAlgorithm’ has not been declared
  148 |         void setCapsuleVsConvexPolyhedronAlgorithm(CapsuleVsConvexPolyhedronAlgorithm* algorithm);
      |                                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/saeun/Projects/coje/venjor/reactphysics3d/include/reactphysics3d/collision/narrowphase/CollisionDispatch.h:151:9: error: ‘CapsuleVsConvexPolyhedronAlgorithm’ does not name a type
  151 |         CapsuleVsConvexPolyhedronAlgorithm* getCapsuleVsConvexPolyhedronAlgorithm();
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/saeun/Projects/coje/venjor/reactphysics3d/include/reactphysics3d/collision/narrowphase/CollisionDispatch.h:154:61: error: ‘ConvexPolyhedronVsConvexPolyhedronAlgorithm’ has not been declared
  154 |         void setConvexPolyhedronVsConvexPolyhedronAlgorithm(ConvexPolyhedronVsConvexPolyhedronAlgorithm* algorithm);
      |                                                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/saeun/Projects/coje/venjor/reactphysics3d/include/reactphysics3d/collision/narrowphase/CollisionDispatch.h:157:9: error: ‘ConvexPolyhedronVsConvexPolyhedronAlgorithm’ does not name a type
  157 |         ConvexPolyhedronVsConvexPolyhedronAlgorithm* getConvexPolyhedronVsConvexPolyhedronAlgorithm();
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/saeun/Projects/coje/venjor/reactphysics3d/include/reactphysics3d/collision/narrowphase/CollisionDispatch.h:163:9: error: ‘NarrowPhaseAlgorithmType’ does not name a type
  163 |         NarrowPhaseAlgorithmType selectNarrowPhaseAlgorithm(const CollisionShapeType& shape1Type,
      |         ^~~~~~~~~~~~~~~~~~~~~~~~
/home/saeun/Projects/coje/venjor/reactphysics3d/include/reactphysics3d/collision/narrowphase/CollisionDispatch.h:176:19: error: ‘SphereVsSphereAlgorithm’ does not name a type
  176 | RP3D_FORCE_INLINE SphereVsSphereAlgorithm* CollisionDispatch::getSphereVsSphereAlgorithm() {
      |                   ^~~~~~~~~~~~~~~~~~~~~~~
/home/saeun/Projects/coje/venjor/reactphysics3d/include/reactphysics3d/collision/narrowphase/CollisionDispatch.h:181:19: error: ‘SphereVsCapsuleAlgorithm’ does not name a type
  181 | RP3D_FORCE_INLINE SphereVsCapsuleAlgorithm* CollisionDispatch::getSphereVsCapsuleAlgorithm() {
      |                   ^~~~~~~~~~~~~~~~~~~~~~~~
/home/saeun/Projects/coje/venjor/reactphysics3d/include/reactphysics3d/collision/narrowphase/CollisionDispatch.h:186:19: error: ‘CapsuleVsCapsuleAlgorithm’ does not name a type
  186 | RP3D_FORCE_INLINE CapsuleVsCapsuleAlgorithm* CollisionDispatch::getCapsuleVsCapsuleAlgorithm() {
      |                   ^~~~~~~~~~~~~~~~~~~~~~~~~
/home/saeun/Projects/coje/venjor/reactphysics3d/include/reactphysics3d/collision/narrowphase/CollisionDispatch.h:191:19: error: ‘SphereVsConvexPolyhedronAlgorithm’ does not name a type
  191 | RP3D_FORCE_INLINE SphereVsConvexPolyhedronAlgorithm* CollisionDispatch::getSphereVsConvexPolyhedronAlgorithm() {
      |                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/saeun/Projects/coje/venjor/reactphysics3d/include/reactphysics3d/collision/narrowphase/CollisionDispatch.h:196:19: error: ‘CapsuleVsConvexPolyhedronAlgorithm’ does not name a type
  196 | RP3D_FORCE_INLINE CapsuleVsConvexPolyhedronAlgorithm* CollisionDispatch::getCapsuleVsConvexPolyhedronAlgorithm() {
      |                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/saeun/Projects/coje/venjor/reactphysics3d/include/reactphysics3d/collision/narrowphase/CollisionDispatch.h:201:19: error: ‘ConvexPolyhedronVsConvexPolyhedronAlgorithm’ does not name a type
  201 | RP3D_FORCE_INLINE ConvexPolyhedronVsConvexPolyhedronAlgorithm* CollisionDispatch::getConvexPolyhedronVsConvexPolyhedronAlgorithm() {
      |                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/saeun/Projects/coje/venjor/reactphysics3d/include/reactphysics3d/collision/narrowphase/NarrowPhaseInput.h:32,
                 from /home/saeun/Projects/coje/venjor/reactphysics3d/include/reactphysics3d/systems/CollisionDetectionSystem.h:40,
                 from /home/saeun/Projects/coje/venjor/reactphysics3d/include/reactphysics3d/engine/PhysicsWorld.h:49,
                 from /home/saeun/Projects/coje/venjor/reactphysics3d/include/reactphysics3d/engine/PhysicsCommon.h:31,
                 from /home/saeun/Projects/coje/venjor/reactphysics3d/include/reactphysics3d/reactphysics3d.h:42,
                 from /home/saeun/Projects/coje/include/coje/Instance.hpp:56,
                 from /home/saeun/Projects/coje/include/coje/Animator.hpp:5,
                 from /home/saeun/Projects/coje/src/Animator.cpp:3:
/home/saeun/Projects/coje/venjor/reactphysics3d/include/reactphysics3d/collision/narrowphase/CollisionDispatch.h:221:1: error: expected declaration before ‘}’ token
  221 | }
      | ^
In file included from /home/saeun/Projects/coje/venjor/reactphysics3d/include/reactphysics3d/systems/CollisionDetectionSystem.h:40,
                 from /home/saeun/Projects/coje/venjor/reactphysics3d/include/reactphysics3d/engine/PhysicsWorld.h:49,
                 from /home/saeun/Projects/coje/venjor/reactphysics3d/include/reactphysics3d/engine/PhysicsCommon.h:31,
                 from /home/saeun/Projects/coje/venjor/reactphysics3d/include/reactphysics3d/reactphysics3d.h:42,
                 from /home/saeun/Projects/coje/include/coje/Instance.hpp:56,
                 from /home/saeun/Projects/coje/include/coje/Animator.hpp:5,
                 from /home/saeun/Projects/coje/src/Animator.cpp:3:
/home/saeun/Projects/coje/venjor/reactphysics3d/include/reactphysics3d/collision/narrowphase/NarrowPhaseInput.h: In member function ‘void reactphysics3d::NarrowPhaseInput::addNarrowPhaseTest(reactphysics3d::uint64, reactphysics3d::Entity, reactphysics3d::Entity, reactphysics3d::CollisionShape*, reactphysics3d::CollisionShape*, const reactphysics3d::Transform&, const reactphysics3d::Transform&, reactphysics3d::NarrowPhaseAlgorithmType, bool, reactphysics3d::LastFrameCollisionInfo*, reactphysics3d::MemoryAllocator&)’:
/home/saeun/Projects/coje/venjor/reactphysics3d/include/reactphysics3d/collision/narrowphase/NarrowPhaseInput.h:137:40: error: ‘SphereVsSphere’ is not a member of ‘reactphysics3d::NarrowPhaseAlgorithmType’
  137 |         case NarrowPhaseAlgorithmType::SphereVsSphere:
      |                                        ^~~~~~~~~~~~~~
/home/saeun/Projects/coje/venjor/reactphysics3d/include/reactphysics3d/collision/narrowphase/NarrowPhaseInput.h:140:40: error: ‘SphereVsCapsule’ is not a member of ‘reactphysics3d::NarrowPhaseAlgorithmType’
  140 |         case NarrowPhaseAlgorithmType::SphereVsCapsule:
      |                                        ^~~~~~~~~~~~~~~
/home/saeun/Projects/coje/venjor/reactphysics3d/include/reactphysics3d/collision/narrowphase/NarrowPhaseInput.h:143:40: error: ‘CapsuleVsCapsule’ is not a member of ‘reactphysics3d::NarrowPhaseAlgorithmType’
  143 |         case NarrowPhaseAlgorithmType::CapsuleVsCapsule:
      |                                        ^~~~~~~~~~~~~~~~
/home/saeun/Projects/coje/venjor/reactphysics3d/include/reactphysics3d/collision/narrowphase/NarrowPhaseInput.h:146:40: error: ‘SphereVsConvexPolyhedron’ is not a member of ‘reactphysics3d::NarrowPhaseAlgorithmType’
  146 |         case NarrowPhaseAlgorithmType::SphereVsConvexPolyhedron:
      |                                        ^~~~~~~~~~~~~~~~~~~~~~~~
/home/saeun/Projects/coje/venjor/reactphysics3d/include/reactphysics3d/collision/narrowphase/NarrowPhaseInput.h:149:40: error: ‘CapsuleVsConvexPolyhedron’ is not a member of ‘reactphysics3d::NarrowPhaseAlgorithmType’
  149 |         case NarrowPhaseAlgorithmType::CapsuleVsConvexPolyhedron:
      |                                        ^~~~~~~~~~~~~~~~~~~~~~~~~
/home/saeun/Projects/coje/venjor/reactphysics3d/include/reactphysics3d/collision/narrowphase/NarrowPhaseInput.h:152:40: error: ‘ConvexPolyhedronVsConvexPolyhedron’ is not a member of ‘reactphysics3d::NarrowPhaseAlgorithmType’
  152 |         case NarrowPhaseAlgorithmType::ConvexPolyhedronVsConvexPolyhedron:
      |                                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/X11/Xlib.h:44,
                 from /home/saeun/Projects/coje/include/coje/Instance.hpp:32,
                 from /home/saeun/Projects/coje/include/coje/Animator.hpp:5,
                 from /home/saeun/Projects/coje/src/Animator.cpp:3:
/home/saeun/Projects/coje/venjor/reactphysics3d/include/reactphysics3d/collision/narrowphase/NarrowPhaseInput.h:155:40: error: expected unqualified-id before numeric constant
  155 |         case NarrowPhaseAlgorithmType::None:
      |                                        ^~~~
In file included from /home/saeun/Projects/coje/venjor/reactphysics3d/include/reactphysics3d/systems/CollisionDetectionSystem.h:40,
                 from /home/saeun/Projects/coje/venjor/reactphysics3d/include/reactphysics3d/engine/PhysicsWorld.h:49,
                 from /home/saeun/Projects/coje/venjor/reactphysics3d/include/reactphysics3d/engine/PhysicsCommon.h:31,
                 from /home/saeun/Projects/coje/venjor/reactphysics3d/include/reactphysics3d/reactphysics3d.h:42,
                 from /home/saeun/Projects/coje/include/coje/Instance.hpp:56,
                 from /home/saeun/Projects/coje/include/coje/Animator.hpp:5,
                 from /home/saeun/Projects/coje/src/Animator.cpp:3:
/home/saeun/Projects/coje/venjor/reactphysics3d/include/reactphysics3d/collision/narrowphase/NarrowPhaseInput.h:155:38: error: expected ‘:’ before numeric constant
  155 |         case NarrowPhaseAlgorithmType::None:
      |                                      ^
      |                                      :
/home/saeun/Projects/coje/venjor/reactphysics3d/include/reactphysics3d/collision/narrowphase/NarrowPhaseInput.h:155:44: error: expected ‘;’ before ‘:’ token
  155 |         case NarrowPhaseAlgorithmType::None:
      |                                            ^
In file included from /home/saeun/Projects/coje/venjor/reactphysics3d/include/reactphysics3d/engine/PhysicsWorld.h:49,
                 from /home/saeun/Projects/coje/venjor/reactphysics3d/include/reactphysics3d/engine/PhysicsCommon.h:31,
                 from /home/saeun/Projects/coje/venjor/reactphysics3d/include/reactphysics3d/reactphysics3d.h:42,
                 from /home/saeun/Projects/coje/include/coje/Instance.hpp:56,
                 from /home/saeun/Projects/coje/include/coje/Animator.hpp:5,
                 from /home/saeun/Projects/coje/src/Animator.cpp:3:
/home/saeun/Projects/coje/venjor/reactphysics3d/include/reactphysics3d/systems/CollisionDetectionSystem.h: At global scope:
/home/saeun/Projects/coje/venjor/reactphysics3d/include/reactphysics3d/systems/CollisionDetectionSystem.h:91:27: error: field ‘mCollisionDispatch’ has incomplete type ‘reactphysics3d::CollisionDispatch’
   91 |         CollisionDispatch mCollisionDispatch;
      |                           ^~~~~~~~~~~~~~~~~~
In file included from /home/saeun/Projects/coje/venjor/reactphysics3d/include/reactphysics3d/collision/ContactPair.h:32,
                 from /home/saeun/Projects/coje/venjor/reactphysics3d/include/reactphysics3d/collision/CollisionCallback.h:31,
                 from /home/saeun/Projects/coje/venjor/reactphysics3d/include/reactphysics3d/engine/PhysicsWorld.h:44,
                 from /home/saeun/Projects/coje/venjor/reactphysics3d/include/reactphysics3d/engine/PhysicsCommon.h:31,
                 from /home/saeun/Projects/coje/venjor/reactphysics3d/include/reactphysics3d/reactphysics3d.h:42,
                 from /home/saeun/Projects/coje/include/coje/Instance.hpp:56,
                 from /home/saeun/Projects/coje/include/coje/Animator.hpp:5,
                 from /home/saeun/Projects/coje/src/Animator.cpp:3:
/home/saeun/Projects/coje/venjor/reactphysics3d/include/reactphysics3d/engine/OverlappingPairs.h:48:7: note: forward declaration of ‘class reactphysics3d::CollisionDispatch’
   48 | class CollisionDispatch;
      |       ^~~~~~~~~~~~~~~~~
ZeunO8 commented 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

DanielChappuis commented 1 year ago

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?

ZeunO8 commented 1 year ago

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

ZeunO8 commented 1 year ago

Yup the order of Xlib / reactphysics3d matters. I included reactphysics3d before Xlib and all compiled successfully

DanielChappuis commented 1 year ago

Ok great it's a better "fix" I think. Thanks for the feedback.