Xcode 7构建失败:ld:找不到-lGoogleAnalyticsServices的库 [英] Xcode 7 build failed: ld: library not found for -lGoogleAnalyticsServices
问题描述
每当我使用Xcode打开我的应用程序时,我都会收到此错误:
Every time when I open my app with Xcode I get this error:
ld: library not found for -lGoogleAnalyticsServices
clang: error: linker command failed with exit code 1 (use -v to see invocation)
然后我需要在 libGoogleAnalyticsServices.a
文件中取消标记目标并再次标记。取消选中/检查目标后,应用程序正常运行...
Then I need to unmark the target on the libGoogleAnalyticsServices.a
file and mark it on again. After the uncheck/check of the target the app runs normally...
发生这种情况时我收到另外2个警告:
I get 2 other warning when this happens:
ld: warning: directory not found for option '-L/Users/vision/Documents/Apps/Mijn Cijfers/Mijn'
ld: warning: directory not found for option '-LCijfers'
现在看来Xcode无法读取空格并查找名为Cijfers的新目录。我的应用程序被称为:Mijn Cijfers,但我之前在项目名称中使用空格时从未遇到此问题。
Now this looks like Xcode can't read spaces and looks for a new directory called Cijfers. My app is called: Mijn Cijfers, but I never had this problem before with spaces in my project name.
每次检查/取消选中<$ c的目标时$ c> libGoogleAnalyticsServices.a 图书馆搜索路径正在添加新行:
Every time when I check/uncheck the target of libGoogleAnalyticsServices.a
the Library Search Path is adding new rows:
我认为这两种情况都必须对我得到的警告和错误做些什么。删除库搜索路径并选中/取消选中目标以让我的应用程序正常运行真的很烦人。 -..-
I think both cases has to do something with the warnings and errors that I get. It's really annoying to remove the Library Search Paths and check/uncheck the target to let my app run normally. -.-
有没有人知道解决这个奇怪错误的解决方案?
Does anyone know a solution to solve this odd bug?
推荐答案
您需要删除除$ inherited之外的所有路径,然后添加Google Analytics库路径(拖动保存库的文件夹)。
You need to delete all these path except the "$inherited" and then add Google Analytics library path (Drag the folder where you saved the library).
如果你遵循这个,那么你不需要重新检查/取消选中库路径。
If you follow this then you don't need to recheck/uncheck the library path.
这篇关于Xcode 7构建失败:ld:找不到-lGoogleAnalyticsServices的库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!