简体   繁体   English

无法构建Xcode项目:clang错误:链接器命令失败

[英]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: 我尝试了很多东西,包括:

  • Building from Unity as Debug and Release 从Unity构建为调试和发布
  • Building from Unity with 'Symlink Unity Libraries' on and off 在Unity中使用'Symlink Unity Libraries'打开和关闭
  • Building from Unity with .Net 3.5 and .Net 4.* flavours 从Unity构建.Net 3.5和.Net 4. *风格
  • Manually adding the libiconv.2.dylib file in the linked frameworks tab as the .tbd equivalent 手动将链接框架选项卡中的libiconv.2.dylib文件添加为.tbd等效项
  • Setting the target minimum version of iOS to 9.0 (negates the need for libiconv.2.dylib entirely) 将iOS的目标最低版本设置为9.0(完全不需要libiconv.2.dylib)

I am using latest versions of everything: 我正在使用一切的最新版本:

  • Unity 2018.2.17f1 Unity 2018.2.17f1
  • Xcode 10.1 Xcode 10.1

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.

相关问题 铛:错误:链接器命令失败,退出代码为1,Xcode链接器错误 - clang: error: linker command failed with exit code 1, Xcode Linker Error Cordova XCode应用程序构建Clang错误链接器命令在启动导航器上失败 - Cordova XCode app build clang error linker command failed on Launch Navigator Unity 3D iOS游戏构建失败Xcode 8.32:“clang错误链接器命令失败,退出代码为1” - Unity 3D iOS Game Build Fail Xcode 8.32: “clang error linker command failed with exit code 1” 使用iOS和Xcode的firebase“铛:错误:链接器命令失败” - firebase “clang: error: linker command failed” with ios and xcode Unity,Xcode和Clang:错误:链接器命令失败,退出代码为1 - Unity, Xcode and clang: error: linker command failed with exit code 1 尝试构建存档Xcode时出错:clang:错误:链接器命令失败,退出代码为1(使用-v查看调用) - Error from trying to build archive Xcode: clang: error: linker command failed with exit code 1 (use -v to see invocation) Xcode构建错误链接器命令失败,退出代码为1 - Xcode build error linker command failed with exit code 1 链接器命令失败错误,xcode? - Linker command failed error, xcode? 链接器命令失败,Xcode项目中出现退出代码1错误 - Linker command failed with exit code 1 error in Xcode project 链接器命令失败,退出代码1 clang:错误 - linker command failed with exit code 1 clang:error
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM