ld:找不到用于 -lAFNetworking xcode 的库
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/40472440/
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
ld: library not found for -lAFNetworking xcode
提问by c00der
I am a total newbie to ios programming. Cloned a friends project. When trying to build (after resolving a lot of other errors), I get the following error:
我是 ios 编程的新手。克隆了一个朋友项目。尝试构建时(在解决了很多其他错误之后),我收到以下错误:
ld: library not found for -lAFNetworking
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I checked the Pod file and searched for AFNetworking in the project, and it is there. Don't know what is going wrong.
我查看了Pod文件,在项目中搜索了AFNetworking,就在那里。不知道出了什么问题。
采纳答案by little
The error message indicates that the library was not found.
该错误消息表明未找到该库。
Make sure that:
确保:
- You see the AFNetworking in your Pods directory.
- Your Pods directory is in the search paths. Go to the project -> Build Settings -> Search for 'search paths' and make sure that your Pods directory is there. You can add it by adding "${PROJECT_DIR}/Pods" for example.
- 您会在 Pods 目录中看到 AFNetworking。
- 您的 Pods 目录位于搜索路径中。转到项目 -> 构建设置 -> 搜索“搜索路径”并确保您的 Pods 目录在那里。例如,您可以通过添加“${PROJECT_DIR}/Pods”来添加它。
回答by t.ios
回答by Zero.D.Saber
add $(inherited)
flag to LIBRARY_SEARCH_PATHS
at build settings
in Xcode target.
在 Xcode 目标中添加$(inherited)
标志到LIBRARY_SEARCH_PATHS
at build settings
。
回答by msk_sureshkumar
1.Remove Path from Other Linker flags 2.Clean the build 3.Run the code
1.Remove Path from Other Linker flags 2.Clean build 3.Run the code
回答by aftab muhammed khan
please try to install COCOAPOD app in your mac.
请尝试在您的 Mac 中安装 COCOAPOD 应用程序。
Try to re attached AFNetworking here is the link please follow the instruction
尝试重新附加 AFNetworking这里是链接,请按照说明操作