3.17我编不过,有编过的大佬愿意分享下吗?
2.46编过 没问题
clang: error: no such file or directory: ‘/Users/xxxx/Library/Developer/Xcode/DerivedData/test1-dfmrivxszifdqtdvfwjwrslqmlta/Build/Products/Debug-iphonesimulator/libsimulator iOS.a’
Command Ld failed with a nonzero exit code
我报这个 
是不是.a文件路径没设置对,或者用真机试试呢
.a文件路径???
我就是cocos new test1 -p test1.xxx.com -l lua新建个test1项目
然后就run
首先会报那个archs,先改成模拟器x86-64,然后不报了,会报这个:
Xcode11.0版本编译Argument value 10880 is outside the valid range [0, 255]_冷飞的博客-CSDN博客
然后照文章解决了。
然后就报这个了
clang: error: no such file or directory: ‘/Users/xxxx/Library/Developer/Xcode/DerivedData/test1-dfmrivxszifdqtdvfwjwrslqmlta/Build/Products/Debug-iphonesimulator/libsimulator iOS.a’
Command Ld failed with a nonzero exit code
这个我不知道怎么解决。。。真机我等下试试。。。
总结下:
cocos2d-x3.17命令行cocos new test1 -p !test1.xxx.com -l lua新建个test1项目,用xcode13打开后
1.会报一个什么Unsupported architecture cdefs.h的错,这个在libsimulator工程的archs增加x86_64就可以解决
2. 接下来会报个什么10880的错,btVector3.h里
#define BT_SHUFFLE(x,y,z,w) ((w)<<6 | (z)<<4 | (y)<<2 | (x))
改成
#define BT_SHUFFLE(x, y, z, w) (((w) << 6 | (z) << 4 | (y) << 2 | (x)) & 0xff)
就能解决
3.接下来会报
ld: in /Users/yizhang/Library/Developer/Xcode/DerivedData/test4-cmubrobyawaujfesyfsiiovzeelt/Build/Products/Debug-iphonesimulator/libcocos2d iOS.a(ftbase.ios8_arm64.o), building for iOS Simulator, but linking in object file built for iOS,
clang: error: linker command failed with exit code 1 (use -v to see invocation)
这个错我不知道怎么解决,卡住。
真机跑起来了没卡住
应该是没有编译模拟器的.a文件吧 所以模拟器跑步起来?
去其他版本里找到.a文件覆盖到指定目录下即可