[英]Xcode 13 failing building with "entry point (_main) undefined. for architecture arm64"
I am trying to build a SDL (libsdl.org) iOS app I havent built for a few years and I am having some problem.我正在尝试构建一个 SDL (libsdl.org) iOS 应用程序,我已经有几年没有构建了,但遇到了一些问题。 Have the following settings:具有以下设置: The error I get is:我得到的错误是:
ld: warning: ignoring file /Users/username/Library/Developer/Xcode/DerivedData/APPNAME-acpmwonxbccjqtaxaenqojducdea/Build/Products/Debug-iphonesimulator/libAPPNAME2.a, building for iOS Simulator-arm64 but attempting to link with file built for iOS Simulator-x86_64 ld:警告:忽略文件/Users/username/Library/Developer/Xcode/DerivedData/APPNAME-acpmwonxbccjqtaxaenqojduccadea/Build/Products/Debug-iphonesimulator/libAPPNAME2.a,为 iOS Simulator-arm64 构建但试图链接为 iOS 构建的文件模拟器-x86_64
ld: entry point (_main) undefined. ld:入口点 (_main) 未定义。 for architecture arm64用于架构 arm64
I am not sure if the first warning is related to the error.我不确定第一个警告是否与错误有关。 I have a target for an archive with SDL source files.我有一个包含 SDL 源文件的存档目标。
If I add arm64 to "Excluded Architectures" (based on other stackoverflow answers) it builds but I get a "Executable Not Found" error message.如果我将 arm64 添加到“Excluded Architectures”(基于其他 stackoverflow 答案),它会构建,但我收到“未找到可执行文件”错误消息。
Any ideas?有任何想法吗?
Removing: "VALID_ARCHS[sdk=*]" = "arm64 armv7 armv7s";删除:“VALID_ARCHS[sdk=*]”=“arm64 armv7 armv7s”; from project.pbxproj solved the problem来自 project.pbxproj 解决了这个问题
I had a same problem.我有同样的问题。 In my case there was no @main annotation in class AppDelegate.在我的例子中,class AppDelegate 中没有@main 注释。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.