I’ve been trying to build the cocos2d-x samples by following the steps from https://github.com/cocos2d/cocos2d-x-samples exactly, namely
$ git clone https://github.com/cocos2d/cocos2d-x-samples.git
$ cd cocos2d-x-samples $ python download-engine.py
Once the samples were downloaded just go any sample, and open the project. eg:
$ cd cocos2d-x-samples/samples/LiquidFun-Testbed/proj.ios_mac
$ open LiquidFun-Testbed.xcodeproj/
However, when I build the LiquidFun-Testbed.xcodeproj, while targeting iOS, I get
Showing All Errors Only Prepare build note: Using legacy build system Build target libcocos2d iOS of project cocos2d_libs with configuration Debug Build target LiquidFun-Testbed iOS of project LiquidFun-Testbed with configuration Debug clang: error: no such file or directory: '/Users/Chris/Desktop/source/repos/3rd party libraries/cocos2d-x-samples/libs/liquidfun/liquidfun/liquidfun/Box2D/Box2D/Dynamics/Contacts/b2EdgeAndPolygonContact.cpp' clang: error: no input files clang: error: no such file or directory: '/Users/Chris/Desktop/source/repos/3rd party libraries/cocos2d-x-samples/libs/liquidfun/liquidfun/liquidfun/Box2D/Box2D/Collision/b2Distance.cpp' clang: error: no input files clang: error: no such file or directory: '/Users/Chris/Desktop/source/repos/3rd party libraries/cocos2d-x-samples/libs/liquidfun/liquidfun/liquidfun/Box2D/Box2D/Common/b2StackAllocator.cpp' clang: error: no input files Build failed 06.01.20, 22:25 698.2 seconds
It looks like the compiler is looking for files in
/Users/Chris/Desktop/source/repos/3rd party libraries/cocos2d-x-samples/libs/liquidfun/liquidfun/liquidfun/Box2D/Box2D/
but this path was never created.
After following the mentioned steps above, Box2D and its code are instead placed in
/Users/Chris/Desktop/source/repos/3rd party libraries/cocos2d-x-samples/libs/cocos2d-x/external/Box2D
…So I am wondering
A) Why is it looking for these files in
/Users/Chris/Desktop/source/repos/3rd party libraries/cocos2d-x-samples/libs/liquidfun/liquidfun/liquidfun/Box2D/Box2D/ ?
B) What can I do to fix this and get these samples to build?