XCode 不构建 Unity3D 项目:找不到 lib
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/24340938/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
XCode does not build Unity3D Project: lib not found
提问by Hyman Smith
I have Unity3D project and I built it for iOS. If I run it using XCode's simulator it works fine. But if I want to compile it for "iOS Device" or for a physical device connected to my Mac, I get lots of errors and as a result I can't create an Archive. For a testing purpose, I even created an empty Unity3D project, built it for iOS and still get the same errors, although this project does absolutely nothing. The errors are the following:
我有 Unity3D 项目,我为 iOS 构建了它。如果我使用 XCode 的模拟器运行它,它工作正常。但是如果我想为“iOS 设备”或连接到我的 Mac 的物理设备编译它,我会收到很多错误,因此我无法创建存档。出于测试目的,我什至创建了一个空的 Unity3D 项目,为 iOS 构建它,但仍然出现相同的错误,尽管该项目完全没有做任何事情。错误如下:
ld: library not found for -liPhone-lib
clang: error: linker command failed with exit code 1 (use -v to see invocation)
ld:找不到 -liPhone-lib 的库
clang:错误:链接器命令失败,退出代码为 1(使用 -v 查看调用)
And these are the settings I use:
这些是我使用的设置:
- Architectures: armv7, armv7s, arm64 (also tried removing arm64 without any positive result)
- Base SDK: iOS 7.1
- Build active: no
- Supported platform: iOS
- Valid arch: armv7, armv7s, arm64
- 体系结构:armv7、armv7s、arm64(也尝试删除 arm64 没有任何积极结果)
- 基础 SDK:iOS 7.1
- 构建活动:否
- 支持平台:iOS
- 有效架构:armv7、armv7s、arm64
I use XCode 5.1.1 and Unity 4.5.1 (previously even tried 4.3.2)
我使用 XCode 5.1.1 和 Unity 4.5.1(以前甚至尝试过 4.3.2)
How can I build the project and create the Archive?
如何构建项目并创建存档?
回答by Injectios
I've run into the same issue some time ago and it was fixed by replacing quotes under library search path:
前段时间我遇到了同样的问题,通过替换库搜索路径下的引号修复了它:
replace
代替
"$(SRCROOT)/Libraries"
with
和
$(SRCROOT)/Libraries
more: http://answers.unity3d.com/questions/538363/error-when-i-updated-to-xcode-5-to-get-import-to-i.html
更多:http: //answers.unity3d.com/questions/538363/error-when-i-updated-to-xcode-5-to-get-import-to-i.html