在已有项目中使用pod导入高德地图,报了以下错误:

ld: warning: directory not found for option '-L/Users/paul/iOS/yun-hui-yi/libs/Release-iphoneos'
Undefined symbols for architecture armv7:
"_OBJC_CLASS_$_MAMapView", referenced from:
objc-class-ref in SingleLocationViewController.o
"_OBJC_CLASS_$_MAPointAnnotation", referenced from:
objc-class-ref in SingleLocationViewController.o
"_OBJC_CLASS_$_MAPinAnnotationView", referenced from:
objc-class-ref in SingleLocationViewController.o
"_OBJC_CLASS_$_AMapLocationManager", referenced from:
objc-class-ref in SingleLocationViewController.o
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code (use -v to see invocation)

首先百度一下,会发现大家遇到这个问题的情况还很多,参考:错误总结:Undefined symbols for architecture

鄙人遇到的问题并不在其列,下面是本人的解决方法:给"Other Linker Flags"添加"$(inherited)"

这还要归功于pod,接下来分享一下个人解决问题的过程:

首先我导入高德地图的方式是pod自动导入,这种方式很方便.在DOS窗口下键入"pod install"后即可导入任何想要的已有第三方库,(具体使用与安装参考:如何安装/更新ruby,安装cocoapods,为开发做好准备!)

然后,我发现这次的导入并没有打印出往常的成功信息,而是出现了以下内容:

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

意思是:

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

于是,按照以前的习惯,在target中搜索:OTHER_LDFLAGS

在Build setting中搜索到了,也就是上面图中所示.

具体什么原因呢?按照以前的做法,pod一般会成功,如果不成功,便是项目中有些设置与pod冲突了,这里便是Other Link Flags冲突了.

iOS导入高德地图出现缺失armv7--"Undefined symbols for architecture armv7"的更多相关文章

  1. iOS工程集成支付宝错误Undefined symbols for architecture armv7

    问题描述: 新工程中需要集成支付宝功能,于是咱就把支付宝的库给集成了进入然后就出现了下面这种错误了说,错误信息如下: Undefined symbols for architecture armv7: ...

  2. iOS出现 Undefined symbols for architecture armv7 std::basic_string<char, std::char_traits<char>

    Undefined symbols for architecture i386: “_OBJC_CLASS_$_XXX”, referenced from: objc-class-ref in XXX ...

  3. 静态库引入引起的错误解决方案,ld: warning: ignoring file ”…/XXX.a”, file was built for archive which is not the architecture being linked (armv7): “…/XXX.a” Undefined symbols for architecture armv7: "_OBJC_CLASS_$

    想目中不免会引入一些静态库,可是有时加入'.a'文件后编译便会报以下错误 ld: warning: ignoring file ”…/XXX.a”, file was built for archiv ...

  4. Undefined symbols for architecture armv7

    xcode编译过程中出现如下问题Undefined symbols for architecture armv7:... ld: symbol(s) not found for architectur ...

  5. Undefined symbols for architecture armv7: "_OBJC_METACLASS_$_ _OBJC_CLASS_$_ ld: symbol(s) not found for architecture armv7错误

    Undefined symbols for architecture armv7:  "_OBJC_METACLASS_$_MWPhotoBrowser", referenced ...

  6. Undefined symbols for architecture armv7错误解决方法

    Undefined symbols for architecture armv7: "_OBJC_CLASS_$_BriefMainModel", referenced from: ...

  7. iOS Undefined symbols for architecture armv7:

    armv6 iPhone.iPhone 3G iPod 1G.iPod 2G armv7 iPhone 3GS.iPhone 4 iPod 3G.iPod 4G.iPod 5G iPad.iPad 2 ...

  8. Xcode编译Undefined symbols for architecture xxx 错误总结

    可能会遇到这几种错误:Undefined symbols for architecture armv7Undefined symbols for architecture armv7sUndefine ...

  9. Undefined symbols for architecture x86_64: ( linker command failed with exit code 1)

    当出现  linker command failed with exit code 1 (use -v to see invocation) 的错误总结,具体内容如下: Undefined symbo ...

随机推荐

  1. Swift-9-类和结构体

    // Playground - noun: a place where people can play import UIKit // 几个重要的概念Properties/Methods/Subscr ...

  2. Swift-7-闭包

    // Playground - noun: a place where people can play import UIKit // swift 中闭包与C和OC中的blocks比较相似 // 1. ...

  3. sql 联合查询

    SELECT NZD_Products.Prd_typename a FROM  dbo.NZD_Products where dbo.NZD_Products.Prd_barcodenumber = ...

  4. C# Dictionary学习

    http://www.cnblogs.com/gdjlc/archive/2010/01/22/2086922.html http://wenku.baidu.com/link?url=TOgeedl ...

  5. 【BZOJ】3300: [USACO2011 Feb]Best Parenthesis(模拟)

    http://www.lydsy.com/JudgeOnline/problem.php?id=3300 这个细节太多QAQ 只要将所有的括号'('匹配到下一个')'然后dfs即可 简单吧,,, #i ...

  6. MathType输入补集符号的步骤有哪些

    集合符号在很多的数学领域都会用到,其基本的集合运算可以分为交.并.补这三种.但是一些用户朋友们在编辑文档的时候想输入集合符号这个时候就需要用到数学公式编辑器MathType,但是很多人能够快速地编辑出 ...

  7. WPF实用知识点

    1.一个基本的WPF程序, 需要引入的程序集WindowsBase, PresentationCore, PresentationFramework using System; using Syste ...

  8. JS语法快速查询

    本文转载至 http://wenku.baidu.com/link?url=z4gND-0w-Cq7hkn2Vnnz0CAJJPwJ8jJrFY0jtnnACiaz4yMK49VAvfJ3BlTVcm ...

  9. BF算法 + KMP算法

    准备: 字符串比大小:比的就是字符串里每个字符的ASCII码的大小.(其实这样的比较没有多大的意义,我们关心的是字符串是否相等,即匹配等) 字符串的存储结构:同线性表(顺序存储+链式存储) 顺序存储结 ...

  10. 通用且常用的Java正则匹配工具,用以检查邮箱名、电话号码、用户密码、邮政编码等合法性

    一个通用且常用的Java正则匹配工具,用以检查邮箱名.电话号码.用户密码.邮政编码等合法性. import java.util.regex.Matcher; import java.util.rege ...