简体   繁体   English

如何在构建 Unity 项目后修复 Xcode 中的“Undefined symbols for architecture arm64:”错误?

[英]How to fix the “Undefined symbols for architecture arm64:” error in Xcode after building a Unity project?

In my Unity project I wanna use Google Mobile Ads and when I build it for Xcode and try to launch on a device, I get the next error.在我的 Unity 项目中,我想使用Google 移动广告,当我为 Xcode 构建它并尝试在设备上启动时,我收到下一个错误。


This is what I'm getting.这就是我得到的。 ld: warning: arm64 function not 4-byte aligned: _unwind_tester from /path_to_my_project/Libraries/libiPhone-lib.a(unwind_test_arm64.o). ld:警告: arm64 function 未对齐 4 字节:来自 /path_to_my_project/Libraries/libiPhone-lib.a(unwind_test_arm64.o) 的 _unwind_tester。 Undefined symbols for architecture arm64: .架构 arm64 的未定义符号: .


在此处输入图像描述 在此处输入图像描述

I had struggled with this issue too and turns out my problem was because my iPhone IOS version didn't match with the setting in the Xcode.我也遇到过这个问题,结果发现我的问题是因为我的 iPhone IOS 版本与 Xcode 中的设置不匹配。

had a similar issue with some of the latest versions of xcode, i solved it by doing the following: xcode 的一些最新版本有类似的问题,我通过执行以下操作解决了它:

  • Install Xcode 9.3.1 (probably other older version will work as well)安装 Xcode 9.3.1(可能其他旧版本也可以)

  • Go to /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/lib in the xcode 9.3.1 installation Go 到 /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/lib 中 xcode 9.3.1 安装

  • copy the libc++ and libstdc++ libraries (there might be some other libraries im missing here, i did this a while ago) over to the same place in your current xcode installation and restart the current xcode and try to build again.将 libc++ 和 libstdc++ 库(这里可能缺少一些其他库,我前一阵子做过)复制到当前 xcode 安装中的同一位置,然后重新启动当前 xcode 并尝试再次构建。

hope this helps!希望这可以帮助!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM