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 ...
随机推荐
- Bean的前身今世&处理器&Aware
出生: <bean>......</bean> 幼年:BeanDefinition bean的接口定义 小学:GenericBeanDefinition 基础的bean映射 ...
- ZooKeeper使用原理
ZooKeeper的基本原理 ZNode的基本概念 ZooKeeper数据模型的结构与Unix文件系统很类似,整体上可以看作是一棵树,每个节点称做一个ZNode.每个ZNode都可以通过其路径唯一标识 ...
- [LintCode] Permuation Index
Given a permutation which contains no repeated number, find its index in all the permutations of the ...
- SGU438 The Glorious Karlutka River =)(最大流)
题目大概说有m个人要过一条宽W的河,人最远跳远距离是d,河上有n个垃圾堆,每个垃圾堆都有坐标和同一时间能容纳的人数,问所有人最少要跳几次才能跳到对岸. 又是一题根据时间拆点的最大流. 二分时间建容量网 ...
- Assets/Sciprts/GameSciprt.js(97,46): BCE0044: expecting :, found ','.
function BuildDeck() { var totalRobots:int=4; var card:Object; var i:int; for(i=0;i<totalRobots;i ...
- BZOJ3046 : lagoon
码农题,拆点BFS预处理出所有联通块的面积即可,注意分类讨论. #include<cstdio> #include<cmath> using namespace std; co ...
- 推荐一个很棒的JS绘图库Flot
Flot是Ole Laursen开发的基于JQuery的纯JavaScript实现的绘图库,Flot使用起来非常简单,绘图效果相当绚丽,而且还支持一些图片的操作功能,例如图片的缩放.可以看一下Flot ...
- 解决xubuntu的thunar第一次启动慢
装了Xubuntu后,一直都挺好,只不过就是有一个问题老困扰我,就是每次开机打开thunar都是极慢的.... 一直没注意,原来也一直找不到问题,后来今天一搜,唷呵...找到了. 解决方法 thuna ...
- USACO 5.4 Telecowmunication(最大流+枚举)
面对最小割之类的题目,完全木想法... 枚举+最大流..复杂度很大了...居然很快的就过了.. /* ID: cuizhe LANG: C++ TASK: telecow */ #include &l ...
- Odoo Entypo Regular Icon List
参考地址: http://www.fontslog.com/entypo-regular-otf-33800.htm#custompreview 或 http://www.w3cplus.com/w3 ...