报错1:
No matching function for call to ‘iconv’
No matching function for call to ‘iconv_close’

解决:
强转:
iconv_close((iconv_t)_iconv);
iconv((iconv_t)_iconv, (char**)&pin, &inLen, &pout, &outLen);

报错2:
Property with ‘retain (or strong)‘ attribute must be of object type
(这是旧版本xcode创建的项目,再更新了xcode版本后打开的报错)
解决:
修改cocos2d_lib.xcodeproj工程的设置
mobie工程修改buildsettings->Deployment->iOSDeploymentTarget 版本,与外部一致
mac工程修改buildsettings->Deployment->macOSDeploymentTarget 版本,与外部一致,
base sdk路径也要修改

问题3:
没有可允许的设备模拟器
A build only device cannot be used to run this target.
解决:
m1芯片旧版本的max系统,右键xcode->显示简介->勾选使用Rosetta打开
新版本的mac系统显示简介里没有Rosetta选项,直接xcode打开项目->Product-> Destination-> Destination Architecturesk 选择用Rosetta模式的模拟器打开

02-12 06:49