[英]Unable to build Xcode Project: clang error: linker command failed
I have a Unity project which I have successfully built for Android without issue. 我有一个Unity项目,我已成功为Android安装而没有问题。 When trying to build for iOS I am encountering an issue once the project is in Xcode.
当尝试为iOS构建时,一旦项目在Xcode中,我就遇到了问题。
Unity compiles without any errors and creates an Xcode project. Unity编译没有任何错误,并创建一个Xcode项目。
Upon opening the Xcode project I have NO simulators available. 一旦打开Xcode项目我没有模拟器可用。 I can get these simulators by selecting
ios
in the Supported Platforms
section, at which point simulators become available - originally Supported Platforms
is set to iphoneos
. 我可以通过在
Supported Platforms
部分选择ios
来获得这些模拟器,此时模拟器可用 - 最初Supported Platforms
设置为iphoneos
。 This seems extremely odd behaviour to me, and suggests something larger going wrong. 这对我来说似乎是非常奇怪的行为,并暗示一些更大的错误。
After getting a simulator to select I get the following error when trying to compile/run/build: 在获得模拟器选择后,我在尝试编译/运行/构建时遇到以下错误:
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
The full error is available on Pastebin (too large to post directly on here): Pastebin上有完整的错误(太大而无法直接在此处发布):
https://pastebin.com/3fYR8fE3 https://pastebin.com/3fYR8fE3
I'm really at a loss on what I can do. 我真的不知所措。 I have tried a number of things, including:
我尝试了很多东西,包括:
libiconv.2.dylib
file in the linked frameworks tab as the .tbd
equivalent libiconv.2.dylib
文件添加为.tbd
等效项 I am using latest versions of everything: 我正在使用一切的最新版本:
It seems like you have the library il2cpp built for another architecture, have you tried to change your target's "Build Settings > Build Active Architectures Only" to "No"? 看起来您已经为另一个架构构建了库il2cpp,您是否尝试将目标的“构建设置>仅构建活动架构”更改为“否”? However I made some researches and it seems that Unity for iPhone doesn't deploy on simulator.
但是我做了一些研究,似乎Unity for iPhone没有在模拟器上部署。 It only works on device or in the Unity editor.
它仅适用于设备或Unity编辑器。 Check this link out
检查此链接
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.