简体   繁体   English

Xcode 13 构建失败,“入口点 (_main) 未定义。对于体系结构 arm64”

[英]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.

相关问题 ld:入口点(_main)未定义。 用于架构 arm64 - ld: entry point (_main) undefined. for architecture arm64 入口点 (_main) 未定义。 对于 Xcode 中的架构 arm64 错误 - Entry point (_main) undefined. for architecture arm64 error in Xcode 入口点(_main)未定义。 for architecture x86_64 - 仅限XCode UITesting - entry point (_main) undefined. for architecture x86_64 - XCode UITesting only ld:入口点 (_main) 未定义。 对于架构 x86_64:Xcode 9 - ld: entry point (_main) undefined. for architecture x86_64 : Xcode 9 升级到Unity 4.6.1后的Xcode 6.1.1链接器错误:入口点(_main)未定义。 用于建筑Armv7 - Xcode 6.1.1 Linker Error after Upgrading to Unity 4.6.1: entry point (_main) undefined. for architecture armv7 如何在构建 Unity 项目后修复 Xcode 中的“Undefined symbols for architecture arm64:”错误? - How to fix the “Undefined symbols for architecture arm64:” error in Xcode after building a Unity project? 添加WatchKit导致链接器错误-拱形arm64的入口点(_main)未定义 - Adding WatchKit cause Linker error - entry point (_main) undefined for arch arm64 仅当构建框架时,体系结构arm64的未定义符号 - Undefined symbols for architecture arm64 only when building framework XCode 12.3 ld:入口点 (_main) 未定义。 对于架构 x86_64 clang:错误:linker 命令失败,退出代码为 1(使用 -v 查看调用) - XCode 12.3 ld: entry point (_main) undefined. for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) XCode - 架构armv7 arm64的未定义符号 - XCode - undefined symbols for architecture armv7 arm64
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM