帮忙:有谁方便提供一个cocos2dx 4.0的可以正常运行的最简demo吗?

按照官方流程创建的cocos2dx 4.0报错,有谁方便提供一个cocos2dx 4.0的可以正常运行的最简demo吗?感谢!!!

报啥错?能给出错误信息么?

最简不就是放个图片打个helloWorld吗?:sweat_smile:

运行环境:Xcode 12.0.1、Cocos2dx 4.0、macOS Big Sur 11.0 Beta版(20A5395g)

安装Cocos2dx 4.0之后,打开并运行生成的iOSDevMagicWeapons.xcodeproj文件,出现以下错误:
clang: error: no such file or directory: ‘/usr/lib/libz.dylib’
clang: error: no such file or directory: ‘/usr/lib/libiconv.dylib’
请问如何解决这种问题,macOS Big Sur 系统的/usr/lib/的确没有这些文件,但是也不允许添加这些情况,请问处理处理?

工程设置里面把这两个库添加进去,这两个文件并不是放在usr那里的,而是放在xcode的目录下面的,你可以写死绝对路径,也可以在Build Phases设置选项中加进去就不用写死路径了

1赞

https://github.com/zhongfq/cocos-lua 可以试一下这个,我弄的,仓库就是一个项目,下载下来可以直接试 android iOS mac windows都可以

感谢 大佬yigezihao

在build settings 里找 linking
把这两个
‘/usr/lib/libz.dylib’
‘/usr/lib/libiconv.dylib’
换成下面那俩地址

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libiconv.dylib

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libz.dylib