目标...覆盖`Pods / Pods.xcconfig中定义的`OTHER_LDFLAGS`构建设置 [英] The target ... overrides the `OTHER_LDFLAGS` build setting defined in `Pods/Pods.xcconfig

查看:327
本文介绍了目标...覆盖`Pods / Pods.xcconfig中定义的`OTHER_LDFLAGS`构建设置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经将 SpatialIite 合并到一个Xcode项目中,该项目使用来自 Proj.4 的头文件,只是一个头。两者都是Xcode项目,并且具有静态目标。

I have incorporate SpatialIite into a Xcode project which uses a header file from Proj.4, just one header. Both are Xcode projects and have static targets.

我正在尝试从git子模块迁移到Cocoapods。由于Cocoapods似乎很难使用静态目标,因此我只想以通常的方式构建项目。我为 Proj.4 制作了podspec。在为 SpatialLite 编写了podfile之后,我得到了警告:

I'm trying to migrate from git submodule to Cocoapods. Since static targets seems to be difficult to use with Cocoapods, I just want to have the project built in the usual way. I made podspec for Proj.4. After writing podfile for SpatialLite I got the warnings:

[!] The target `SpatialiteIOS [Debug]` overrides the `OTHER_LDFLAGS` build setting defined in `Pods/Pods.xcconfig'.
    - Use the `$(inherited)` flag, or
    - Remove the build settings from the target.

[!] The target `SpatialiteIOS [Debug]` overrides the `HEADER_SEARCH_PATHS` build setting defined in `Pods/Pods.xcconfig'.
    - Use the `$(inherited)` flag, or
    - Remove the build settings from the target.

[!] The target `SpatialiteIOS [Debug - Release]` overrides the `OTHER_LDFLAGS` build setting defined in `Pods/Pods.xcconfig'.
    - Use the `$(inherited)` flag, or
    - Remove the build settings from the target.

[!] The target `SpatialiteIOS [Debug - Release]` overrides the `HEADER_SEARCH_PATHS` build setting defined in `Pods/Pods.xcconfig'.
    - Use the `$(inherited)` flag, or
    - Remove the build settings from the target.

我读了此问题,但是我对警告的含义以及解决该问题的方法一无所知。

I read this issue but I'm pretty clueless to what the warnings mean and what can I do to fix it.

另外一个问题是,我打开工作空间以及仅打开SpatiaLite项目,两者都针对Mac OSX 64(假设是iOS项目)。我的podfile确实说 platform:ios。

Additionally problem, when I open the workspace as well as opening SpatiaLite project alone, both are targeted to Mac OSX 64, when it is suppose to be an iOS project. My podfile does say "platform :ios".

推荐答案

在大多数情况下,这肯定是可行的:

This definitely works most of the time:

转到目标构建设置->其他链接器标志->双击。将 $(继承)添加到新行。

Go to your target Build Settings -> Other linker flags -> double click . Add $(inherited) to a new line.

如果您对 ...目标有疑问, GCC_PREPROCESSOR_DEFINITIONS构建设置在...中定义,那么您必须将$(继承)添加到目标构建设置->预处理器宏

If you have problem with "...target overrides the GCC_PREPROCESSOR_DEFINITIONS build setting defined in..." then you must add $(inherited) to your target Build Settings -> Preprocessor Macros

这篇关于目标...覆盖`Pods / Pods.xcconfig中定义的`OTHER_LDFLAGS`构建设置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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