我已经合并SpatialIite
到一个Xcode项目中,该项目使用头文件Proj.4
,只有一个头文件.两者都是Xcode项目并具有静态目标.
我正在尝试从git子模块迁移到Cocoapods.由于静态目标似乎很难与Cocoapods一起使用,我只想以通常的方式构建项目.我做了podspec Proj.4
.写完podfile之后SpatialLite
我收到了警告:
[!] 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.
Run Code Online (Sandbox Code Playgroud)
我读过这个问题,但我对这些警告意味着什么以及我能做些什么来修复它几乎一无所知.
另外一个问题是,当我打开工作区以及单独打开SpatiaLite项目时,两者都是针对Mac OSX 64的,当它被认为是一个iOS项目时.我的podfile确实说"platform:ios".
Ank*_*ain 524
这绝对适用于大部分时间:
转到目标构建设置 - >其他链接器标志 - >双击.添加$(inherited)
到新行.
如果您遇到"... target覆盖...中定义的GCC_PREPROCESSOR_DEFINITIONS构建设置"的问题,那么您必须将$(继承)添加到目标Build Settings - > Preprocessor Macros
pha*_*ann 75
您的构建设置与Cocoapods想要的默认构建设置之间存在冲突.要查看Cocoapods构建设置,请在项目中的Pods/Target Support Files/Pods - $ {PROJECTNAME} /中查看.xcconfig文件.对我来说这个文件包含:
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers" "${PODS_ROOT}/Headers/Commando"
OTHER_LDFLAGS = -ObjC -framework Foundation -framework QuartzCore -framework UIKit
PODS_ROOT = ${SRCROOT}/Pods
Run Code Online (Sandbox Code Playgroud)
如果您对Cocoapods设置感到满意,请转到项目的Build Settings,找到合适的设置并点击Delete键.这将使用Cocoapods的设置.
另一方面,如果您需要使用自定义设置,则将$(继承)添加到该设置.
zee*_*wan 27
我在终端中看到了pod命令的这3个错误
pod install
Run Code Online (Sandbox Code Playgroud)
[!] MY_APP [Debug/Release]目标覆盖HEADER_SEARCH_PATHS ...
[!] MY_APP [Debug/Release]目标覆盖OTHER_LDFLAGS ...
[!] MY_APP [Debug/Release]目标覆盖GCC_PREPROCESSOR_DEFINITIONS .. .
通过添加$(继承)来消除所有这3个错误
在项目 - >目标 - >构建设置
现在命令将运行而不会出现任何错误
pod install
Run Code Online (Sandbox Code Playgroud)
Sam*_*hen 21
在您的项目中,查找Target -> Build Settings -> Other Linker Flags
,选择Other Linker Flags
,按delete
(Mac键盘)/ Backspace
(普通键盘)以恢复设置.这个对我有用.
例:
之前
后
Ani*_*nil 19
我跑的时候遇到了类似的问题pod install
,我看到了以下警告/错误(相关CLANG_CXX_LIBRARY
):
[!] The `Project [Debug]` target overrides the `CLANG_CXX_LIBRARY` build setting defined in `Pods/Target Support Files/Pods/Pods.debug.xcconfig'. This can lead to problems with the CocoaPods installation
- Use the `$(inherited)` flag, or
- Remove the build settings from the target.
[!] The `Project [Release]` target overrides the `CLANG_CXX_LIBRARY` 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.
Run Code Online (Sandbox Code Playgroud)
Project
,你可以看到Build Settings
.Target
(AppName
下Targets
)C++ Standard Library
(它可能会在BOLD中 - 这意味着它被覆盖了).该行不应再加粗,如果您运行pod install
警告/错误应该已经消失.
And*_*son 10
对我来说,问题在于我的目标测试.$(inherited)
我的主应用目标已经有了旗帜.
我将它添加到MyAppTests Other Linker标志中.之后,当我运行pod install
警告消息时,消失了.
下面的第一行链接节省了我的一天:
要从项目的构建设置中为选项添加值,请在值列表前加上$(inherited).
https://github.com/CocoaPods/CocoaPods/wiki/Creating-a-project-that-uses-CocoaPods#faq
另外,不要忘记在pod文件的开头插入此行:
platform :iOS, '5.0'
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
117541 次 |
最近记录: |