找不到 xcode 库 [英] xcode library not found
问题描述
我收到以下错误:
ld:未找到用于 -lGoogleAnalytics 的库clang:错误:链接器命令失败,退出代码为 1(使用 -v 查看调用)
ld: library not found for -lGoogleAnalytics clang: error: linker command failed with exit code 1 (use -v to see invokation)
我花了一些时间在谷歌上搜索,但找不到如何解决这个问题.我是 xcode 的新手,这是我需要处理的现有项目.
I've spent some time googling but can't find how to fix this problem. I'm new to xcode and this is an existing project that I need to work on.
推荐答案
您需要设置项目的链接器搜索路径"(对于 Debug 和 Release 版本).如果这个库在项目的同级目录中,那么你可以这样设置:
You need to set the "linker search paths" of the project (for both Debug and Release builds). If this library was in, say, a sibling directory to the project then you can set it like this:
$(PROJECT_DIR)/../GoogleAnalytics/lib
(您希望避免使用绝对路径,而是保持库目录相对于项目).
(you want to avoid using an absolute path, instead keep the library directory relative to the project).
这篇关于找不到 xcode 库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!