我刚刚将 Box2D 库 (#include
**In file included from /Users/me/.conan2/p/b/box2dd2031ba5ab13f/p/include/box2d/box2d.h:7:
In file included from /Users/me/.conan2/p/b/box2dd2031ba5ab13f/p/include/box2d/collision.h:7:
/Users/me/.conan2/p/b/box2dd2031ba5ab13f/p/include/box2d/math_functions.h:614:15: error: conflicting types for 'operator-'
614 | inline b2Vec2 operator-( b2Vec2 a, b2Vec2 b )
| ^
/Users/me/.conan2/p/b/box2dd2031ba5ab13f/p/include/box2d/math_functions.h:602:15: note: previous definition is here
602 | inline b2Vec2 operator-( b2Vec2 a )
| ^
/Users/me/.conan2/p/b/box2dd2031ba5ab13f/p/include/box2d/math_functions.h:626:15: error: conflicting types for 'operator*'
626 | inline b2Vec2 operator*( b2Vec2 a, float b )
| ^
/Users/me/.conan2/p/b/box2dd2031ba5ab13f/p/include/box2d/math_functions.h:620:15: note: previous definition is here
620 | inline b2Vec2 operator*( float a, b2Vec2 b )
| ^
2 errors generated.
make[2]: *** [CMakeFiles/carimbo.dir/cmake_pch.hxx.pch] Error 1
make[1]: *** [CMakeFiles/carimbo.dir/all] Error 2
make: *** [all] Error 2**
有什么问题吗?
感谢 ChatGPT,问题是因为我将库包含在外部“C”部分,移到外部解决了问题。