library not found for -lPods 的解决办法
在老项目工程中使用cocoapods,可能会报这个错误:library not found for -lPods .
导致这个错误可能有两个原因,这两个原因在编译过程中都是有蛛丝马迹可循的。
原因1:
在 pod install时,就会有告警信息提示:
xxx target overrides the `OTHER_LDFLAGS` build setting defined in `Pods/Target Support Files/Pods/Pods.debug.xcconfig'. This can lead to problems with the CocoaPods installation
xxx target overrides the `HEADER_SEARCH_PATHS` build setting defined in `Pods/Target Support Files/Pods/Pods.release.xcconfig'. This can lead to problems with the CocoaPods installation
xxx target overrides the `OTHER_CFLAGS` build setting defined in `Pods/Target Support Files/Pods/Pods.release.xcconfig'. This can lead to problems with the CocoaPods installation
This can lead to problems with the CocoaPods installation
- Use the `$(inherited)` flag, or
- Remove the build settings from the target.
- Use the `$(inherited)` flag, or
- Remove the build settings from the target.
- Use the `$(inherited)` flag, or
- Remove the build settings from the target.
- Use the `$(inherited)` flag, or
- Remove the build settings from the target.
- Use the `$(inherited)` flag, or
- Remove the build settings from the target.
- Use the `$(inherited)` flag, or
- Remove the build settings from the target.
很明确的告知:通过添加 `$(inherited)` flag 可以解决该问题。
根据调试确认,OTHER_LDFLAGS 指的是 other linker flags; OTHER_CFLAGS 指的是 other c flags;HEADER_SEARCH_PATHS 指的是 header search paths.
将这三处修改完毕后再次运行pod install,可以发现告警信息已经不再出现了。
原因2:
在编译时有如下的警告和错误:
1.警告: Target 'Pods' of project 'Pods' was rejected as an implicit dependency for 'libPods.a' because its architectures 'arm64' didn't contain all required architectures 'armv7 arm64'
2.错误: ld: library not found for -lpop
clang: error: linker command failed with exit code 1 (use -v to see invocation)
这里不留神可能警告会被忽略(毕竟在一个老项目中有一些警告很正常),但这个警告才是问题的关键。
pod里面的build选项里build active architecture only 在 debug情形下默认是 YES, 这里如果和你项目的该设置不匹配(笔者用来调试的项目这里设置就是NO)的话那么就会报告该错误。
在pods里面的target中挨个修改其配置和原有的工程一致,然后clean编译,项目即可正常运行。
library not found for -lPods 的解决办法的更多相关文章
- Anaconda"无法定位程序输入点 OPENSSL_sk_new_reserve 于动态链接库Anaconda3\Library\bin\libssl-1_1-x64.dll上"的解决办法
Anaconda"无法定位程序输入点 OPENSSL_sk_new_reserve 于动态链接库Anaconda3\Library\bin\libssl-1_1-x64.dll上" ...
- Maven项目Update Project后JRE System Library自动变回1.5解决办法
最近在搭建Spring Boot项目<一步步搭建 Spring Boot maven 框架的工程>的时候,虽然设置JRE System Library为1.8,但是,当我 用 Maven ...
- 对于“Newtonsoft.Json”已拥有为“NETStander.Library”定义的依赖项,解决办法
问题描述: 在使用visual studio中的NuGet包管理下载程序时,有时会出现-对于“Newtonsoft.Json”已拥有为“NETStander.Library”定义的依赖项,这样的错误. ...
- Cannot find executable for CFBundle 解决办法
出错日志为:2013-12-29 01:17:49.785 Displaying Alerts with UIAlertView[419:70b] Cannot find executable for ...
- vs2010用NuGet(程序包管理)安装EF失败之解决办法
今天用程序包管理控制台安装EF.报错.如下
- iOS开发遇到的坑之六--使用cocopods管理第三方库时,编译出现Library not found for -lPods问题的解决办法
在项目中有时候会遇到Library not found for -lPods(这里的IPods指的是你具体的第三方库)的问题 出现这个错误的原因是:xcode在编译的时候找不到这个库,从而导致项目无法 ...
- xocodebulid 自动化打包 解决提示 ld: library not found for -lPods 问题
如果你的项目用到cocopod 第三方库.使用xcodebulid 估计会出现 ld: library not found for -lPods 以下 是我的解决办法 xcodebuild -work ...
- 解决 ld: library not found for -lPods的问题
现在打开有pods建好的workspace文件,尝试编译,会报ld: library not found for -lPods错误,原因就是工程里面的设置项覆盖了pods中xcconfig中的设置.解 ...
- Eclipse 关于“The type * is not accessible due to restriction on required library”问题的解决办法
The type * is not accessible due to restriction on required library”的错误, 意思是所需要的类库由于受限制无法访问. 解决办法: 1 ...
随机推荐
- Java 时间架构图
Java 的Calendar,Date,TimeZone,Locale和DateFormat的关系图如下: 说明: milliseconds表示毫秒. milliseconds = "实际时 ...
- HDU4862 Jump(放大边权的费用流)
题目大概给一个n×m的格子,每个格子有一个一位数字,格子不能重复经过,最多进行这样的k次行走:每一次选择任意一个格子出发,可以从当前格子走到下面或右边格子,花费能量是曼哈顿距离-1,而如果起点和终点格 ...
- Unity3D Built-in Shader详解一
Unity3D内置了很多Shader,文档很详细,自己翻一下.便于加深印象. 首先先解释下Unity3D的Shader.Unity里面的Shaders是使用一种叫ShaderLab的语言编写的,它同微 ...
- MySQL 记录不存在时插入 记录存在则更新的实现方法
INSERT INTO table (a,b,c) VALUES (1,2,3) ON DUPLICATE KEY UPDATE c=c+1; INSERT 中 ON DUPLICATE KEY UP ...
- 禁止用户自己停止SEP - 飞舞的菜刀 - 51CTO技术博客
员工在自己的工作站上,右键点击状态栏SEP图标,停止SEP服务,导致管理员定制的策略失效,针对上述情况,请安装下述方法操作. 1. 打开SEPM. 2. 在[策略]里选中你所使用的[防病毒和防间谍软件 ...
- Bloomberg SEP 12.x 迁移小记
备份 个文件: D:\Program Files\Symantec\Symantec Endpoint Protection Manager\Server Private Key Backup ...
- 7. Add a networking service
Controller Node: 1. sudo vi /etc/nova/nova.conf [DEFAULT] ... network_api_class = nova.network.api.A ...
- IMAP命令
IMAP命令学习1.CREATE <folder>CREATE可以创建指定名字的新邮箱.邮箱名称通常是带路径的文件夹全名.(有些IMAP客户机使用邮件夹称呼新邮箱)C: A003 CREA ...
- [IT学习]微软如何做网站内容治理
How Microsoft does SharePoint Governance for their internal platform english sources from:http://www ...
- java int转integer方法
由于AutoBoxing的存在,以下代码在JDK1.5的环境下可以编译通过并运行. int i = 0; Integer wrapperi = i; 还有其他方法? JDK1.5为Integer增加了 ...