是什么导致我的CMake多目标模式错误?

问题描述 投票:0回答:1

我一直在尝试在代码块上安装box2D 2.3。一切进展顺利,直到我遇到了.make文件的障碍。我相信大多数问题是由代码块使用“ \”而不是“ /”作为文件路径引起的。但是,由于出现错误,我被卡住了:

||=== Build: all in Box2D (compiler: GNU GCC Compiler) ===|
Box2D\CMakeFiles\Box2D.dir\build.make|803|*** multiple target patterns.  Stop.|
CMakeFiles\Makefile2|96|recipe for target 'Box2D/CMakeFiles/Box2D.dir/all' failed|
C:\Users\111\Documents\C++ Libraries\box2d-2.3.0\box2d-2.3.0\Box2D\Build\Makefile|82|recipe for target 'all' failed|
||=== Build failed: 3 error(s), 0 warning(s) (0 minute(s), 1 second(s)) ===|

第803行:

@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --bold --progress-dir="C:/Users/151/Documents/C++ Libraries/box2d-2.3.0/box2d-2.3.0/Box2D/Build/CMakeFiles" --progress-num=$(CMAKE_PROGRESS_47) "Linking CXX static library libBox2D.a"

这是可能会导致.make文件错误的相关代码块。

# External object files for target Box2D
Box2D_EXTERNAL_OBJECTS = \
Box2D/libBox2D.a: Box2D/CMakeFiles/Box2D.dir/Dynamics/Joints/b2DistanceJoint.cpp.obj
Box2D/libBox2D.a: Box2D/CMakeFiles/Box2D.dir/Dynamics/Joints/b2FrictionJoint.cpp.obj
Box2D/libBox2D.a: Box2D/CMakeFiles/Box2D.dir/Dynamics/Joints/b2GearJoint.cpp.obj
Box2D/libBox2D.a: Box2D/CMakeFiles/Box2D.dir/Dynamics/Joints/b2Joint.cpp.obj
Box2D/libBox2D.a: Box2D/CMakeFiles/Box2D.dir/Dynamics/Joints/b2MotorJoint.cpp.obj
Box2D/libBox2D.a: Box2D/CMakeFiles/Box2D.dir/Dynamics/Joints/b2MouseJoint.cpp.obj
Box2D/libBox2D.a: Box2D/CMakeFiles/Box2D.dir/Dynamics/Joints/b2PrismaticJoint.cpp.obj
Box2D/libBox2D.a: Box2D/CMakeFiles/Box2D.dir/Dynamics/Joints/b2PulleyJoint.cpp.obj
Box2D/libBox2D.a: Box2D/CMakeFiles/Box2D.dir/Dynamics/Joints/b2RevoluteJoint.cpp.obj
Box2D/libBox2D.a: Box2D/CMakeFiles/Box2D.dir/Dynamics/Joints/b2RopeJoint.cpp.obj
Box2D/libBox2D.a: Box2D/CMakeFiles/Box2D.dir/Dynamics/Joints/b2WeldJoint.cpp.obj
Box2D/libBox2D.a: Box2D/CMakeFiles/Box2D.dir/Dynamics/Joints/b2WheelJoint.cpp.obj
Box2D/libBox2D.a: Box2D/CMakeFiles/Box2D.dir/Dynamics/Contacts/b2CircleContact.cpp.obj
Box2D/libBox2D.a: Box2D/CMakeFiles/Box2D.dir/Dynamics/Contacts/b2Contact.cpp.obj
Box2D/libBox2D.a: Box2D/CMakeFiles/Box2D.dir/Dynamics/Contacts/b2ContactSolver.cpp.obj
Box2D/libBox2D.a: Box2D/CMakeFiles/Box2D.dir/Dynamics/Contacts/b2PolygonAndCircleContact.cpp.obj
Box2D/libBox2D.a: Box2D/CMakeFiles/Box2D.dir/Dynamics/Contacts/b2EdgeAndCircleContact.cpp.obj
Box2D/libBox2D.a: Box2D/CMakeFiles/Box2D.dir/Dynamics/Contacts/b2EdgeAndPolygonContact.cpp.obj
Box2D/libBox2D.a: Box2D/CMakeFiles/Box2D.dir/Dynamics/Contacts/b2ChainAndCircleContact.cpp.obj
Box2D/libBox2D.a: Box2D/CMakeFiles/Box2D.dir/Dynamics/Contacts/b2ChainAndPolygonContact.cpp.obj
Box2D/libBox2D.a: Box2D/CMakeFiles/Box2D.dir/Dynamics/Contacts/b2PolygonContact.cpp.obj
Box2D/libBox2D.a: Box2D/CMakeFiles/Box2D.dir/Dynamics/b2Body.cpp.obj
Box2D/libBox2D.a: Box2D/CMakeFiles/Box2D.dir/Dynamics/b2ContactManager.cpp.obj
Box2D/libBox2D.a: Box2D/CMakeFiles/Box2D.dir/Dynamics/b2Fixture.cpp.obj
Box2D/libBox2D.a: Box2D/CMakeFiles/Box2D.dir/Dynamics/b2Island.cpp.obj
Box2D/libBox2D.a: Box2D/CMakeFiles/Box2D.dir/Dynamics/b2World.cpp.obj
Box2D/libBox2D.a: Box2D/CMakeFiles/Box2D.dir/Dynamics/b2WorldCallbacks.cpp.obj
Box2D/libBox2D.a: Box2D/CMakeFiles/Box2D.dir/Common/b2BlockAllocator.cpp.obj
Box2D/libBox2D.a: Box2D/CMakeFiles/Box2D.dir/Common/b2Draw.cpp.obj
Box2D/libBox2D.a: Box2D/CMakeFiles/Box2D.dir/Common/b2Math.cpp.obj
Box2D/libBox2D.a: Box2D/CMakeFiles/Box2D.dir/Common/b2Settings.cpp.obj
Box2D/libBox2D.a: Box2D/CMakeFiles/Box2D.dir/Common/b2StackAllocator.cpp.obj
Box2D/libBox2D.a: Box2D/CMakeFiles/Box2D.dir/Common/b2Timer.cpp.obj
Box2D/libBox2D.a: Box2D/CMakeFiles/Box2D.dir/Collision/Shapes/b2CircleShape.cpp.obj
Box2D/libBox2D.a: Box2D/CMakeFiles/Box2D.dir/Collision/Shapes/b2EdgeShape.cpp.obj
Box2D/libBox2D.a: Box2D/CMakeFiles/Box2D.dir/Collision/Shapes/b2ChainShape.cpp.obj
Box2D/libBox2D.a: Box2D/CMakeFiles/Box2D.dir/Collision/Shapes/b2PolygonShape.cpp.obj
Box2D/libBox2D.a: Box2D/CMakeFiles/Box2D.dir/Collision/b2BroadPhase.cpp.obj
Box2D/libBox2D.a: Box2D/CMakeFiles/Box2D.dir/Collision/b2CollideCircle.cpp.obj
Box2D/libBox2D.a: Box2D/CMakeFiles/Box2D.dir/Collision/b2CollideEdge.cpp.obj
Box2D/libBox2D.a: Box2D/CMakeFiles/Box2D.dir/Collision/b2CollidePolygon.cpp.obj
Box2D/libBox2D.a: Box2D/CMakeFiles/Box2D.dir/Collision/b2Collision.cpp.obj
Box2D/libBox2D.a: Box2D/CMakeFiles/Box2D.dir/Collision/b2Distance.cpp.obj
Box2D/libBox2D.a: Box2D/CMakeFiles/Box2D.dir/Collision/b2DynamicTree.cpp.obj
Box2D/libBox2D.a: Box2D/CMakeFiles/Box2D.dir/Collision/b2TimeOfImpact.cpp.obj
Box2D/libBox2D.a: Box2D/CMakeFiles/Box2D.dir/Rope/b2Rope.cpp.obj
Box2D/libBox2D.a: Box2D/CMakeFiles/Box2D.dir/build.make
Box2D/libBox2D.a: Box2D/CMakeFiles/Box2D.dir/link.txt

    @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --bold --progress-dir="C:/Users/111/Documents/C++ Libraries/box2d-2.3.0/box2d-2.3.0/Box2D/Build/CMakeFiles" --progress-num=$(CMAKE_PROGRESS_47) "Linking CXX static library libBox2D.a"
    cd /d C:/Users/111/DOCUME~1/C__LIB~1/BOX2D-~1.0/BOX2D-~1.0/Box2D/Build/Box2D && $(CMAKE_COMMAND) -P CMakeFiles/Box2D.dir/cmake_clean_target.cmake
    cd /d C:/Users/111/DOCUME~1/C__LIB~1/BOX2D-~1.0/BOX2D-~1.0/Box2D/Build/Box2D && $(CMAKE_COMMAND) -E cmake_link_script CMakeFiles/Box2D.dir/link.txt --verbose=$(VERBOSE)

# Rule to build all files generated by this target.
Box2D/CMakeFiles/Box2D.dir/build: Box2D/libBox2D.a
makefile cmake box2d
1个回答
0
投票

我在示例makefile文件中看不到任何反斜杠,所以我认为这不是问题。

© www.soinside.com 2019 - 2024. All rights reserved.