XCode 6 CocoaPods错误:target会覆盖`OTHER_LDFLAGS`构建设置 [英] XCode 6 CocoaPods error : target overrides the `OTHER_LDFLAGS` build setting

查看:167
本文介绍了XCode 6 CocoaPods错误:target会覆盖`OTHER_LDFLAGS`构建设置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚开始使用CocoaPods,当我从终端安装pod时,我遇到以下错误(我的项目名为babyMilestones,我正在尝试将CocoaPods用于ShipLib框架)。 :

I just starting using CocoaPods and I am getting the following errors when I pod install from the terminal (My project is called babyMilestones and I'm trying to use CocoaPods for the ShipLib Framework). :


babyMilestones [Release] 目标会覆盖 FRAMEWORK_SEARCH_PATHS Pods / Target Support Files / Pods / Pods.release.xcconfig'中定义的构建设置。这可能导致CocoaPods安装问题
- 使用
$(继承)`标志,或
- 从目标中删除构建设置。

The babyMilestones [Release] target overrides the FRAMEWORK_SEARCH_PATHS build setting defined in Pods/Target Support Files/Pods/Pods.release.xcconfig'. This can lead to problems with the CocoaPods installation - Use the$(inherited)` flag, or - Remove the build settings from the target.

我收到了标题搜索路径和框架搜索路径的错误。

I'm getting this error for Header Search Paths and Framework Search Paths.

当我尝试构建项目时,我在#import行上收到错误,指出找不到ShipLib / ShipLib.h文件。在我的项目导航器中,我的Pods项目正确显示,并且ShipLib框架可见。

When I try to build my project I get an error on the #import line saying the ShipLib/ShipLib.h file cannot be found. In my project navigator my Pods project is showing properly, and the ShipLib framework is visible.

我从未明确设置任何这些搜索路径,我只是让XCode 6做到这一点。我找到了这个答案:目标。 ..覆盖`Pods / Pods.xcconfig 中定义的`OTHER_LDFLAGS`构建设置
我尝试过以下内容:

I never set any of these search paths explicitly, I just let XCode 6 do it's thing. I found this answer : The target ... overrides the `OTHER_LDFLAGS` build setting defined in `Pods/Pods.xcconfig I have tried the following :


  1. 删除了构建设置中的所有框架搜索路径。这不能解决问题

  1. Deleted all the Framework Search Paths in Build Settings. This did not fix the issue

然后我将$(继承)添加到Framework Search Path。我做了Clean然后Build。这给出了以下类型的新错误:

I then added $(inherited) to the Framework Search Path. I did Clean then Build. This gave new errors of the following type:


ld:警告:找不到选项'-L / Users / billpaystation / Documents /的目录iOS / baby里程碑/ babyMilestones / Pods / build / Debug-iphoneos'
ld:警告:找不到选项'-F'的目录
架构i386的未定义符号:
_OBJC_CLASS _ $ _ ActionSheetDatePicker ,引自:
objc-class-ref在EditItemViewController.o
_OBJC_CLASS _ $ _ SYSincerelyController,引自:
objc-class-ref in EditItemViewController.o
ld:symbol (s)未找到架构i386
clang:错误:链接器命令失败,退出代码为1(使用-v查看调用)

ld: warning: directory not found for option '-L/Users/billpaystation/Documents/iOS/babyMilestones/babyMilestones/Pods/build/Debug-iphoneos' ld: warning: directory not found for option '-F' Undefined symbols for architecture i386: "_OBJC_CLASS_$_ActionSheetDatePicker", referenced from: objc-class-ref in EditItemViewController.o "_OBJC_CLASS_$_SYSincerelyController", referenced from: objc-class-ref in EditItemViewController.o ld: symbol(s) not found for architecture i386 clang: error: linker command failed with exit code 1 (use -v to see invocation)


操作表选取器和真诚控制器是我尝试使用Pod添加的库。

Action Sheet Picker and Sincerely Controller are the libraries I'm trying to add with Pods.


  1. 我注意到我的文件检查器中的框架下的libPods.a为红色。所以我去了Scheme - > Edit Scheme->并将Pod添加到Build中。
    我真的不了解整个目标/构建设置而我可能有尝试这么多不同的事情让事情变得更糟。任何帮助将不胜感激!


推荐答案

您应该将$(继承)添加到框架搜索路径。对于新的错误你应该去:

You should add $(inherited) to the Framework Search Path. For the new errors you should go:

TargetSettings-> Build Phases-> Compile Sources - >(+)ActionSheetDatePicker.m和SYSincerelyController.m类然后Build和跑。

TargetSettings->Build Phases->Compile Sources->(+) ActionSheetDatePicker.m, and SYSincerelyController.m classes and then Build and Run.

这篇关于XCode 6 CocoaPods错误:target会覆盖`OTHER_LDFLAGS`构建设置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆