在已有项目中使用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. 从git中更新本地需要填写的正则

    <IfModule mod_rewrite.c> Options +FollowSymlinks RewriteEngine On RewriteCond %{REQUEST_FILENA ...

  2. 第一百五十六节,封装库--JavaScript,延迟加载

    封装库--JavaScript,延迟加载 延迟加载的好处,就是在浏览器视窗外的图片,不加载,拖动鼠标到浏览器视窗内后加载,用户不看的图片就不用加载,可以减少服务器大量流量 将图片的src地址用一张统一 ...

  3. 使用BarcodeLib.Barcode.ASP.NET生成条形码

    生成条形码图片,然后在前台页面展示: <img id="img" src="Mobile/<%=url %>"/> public str ...

  4. Hive数据类型与文件存储格式

    Hive数据类型 基础数据类型: TINYINT,SMALLINT,INT,BIGINT,BOOLEAN,FLOAT,DOUBLE,STRING,BINARY,TIMESTAMP,DECIMAL,CH ...

  5. asp.net网站防恶意刷新的Cookies与Session解决方法

    本文实例讲述了asp.net网站防恶意刷新的Cookies与Session解决方法,是WEB程序设计中非常实用的技巧.分享给大家供大家参考.具体实现方法如下: Session版实现方法: public ...

  6. Eclipse Android 代码自己主动提示功能

    Eclipse Android 代码自己主动提示功能 Eclipse for android 实现代码自己主动提示智能提示功能.介绍 Eclipse for android 编辑器中实现两种主要文件 ...

  7. angularjs中的$destroy和$timeout

    module.controller("TestController", function($scope, $timeout) { var onTimeout = function( ...

  8. 纯java实现邮件发送服务(亲测好用)

    今天自己测试了一下用java代码实现发送有限的服务,非常简单.直接贴代码: import com.sun.mail.util.MailSSLSocketFactory; import javax.ma ...

  9. POJ 2773 Happy 2006(容斥原理+二分)

    Happy 2006 Time Limit: 3000MS   Memory Limit: 65536K Total Submissions: 10827   Accepted: 3764 Descr ...

  10. 6号css学习小记

    一.overfloat属性:(四个值) visible :默认值.内容不会被修剪,会呈现在元素匡之外. hidden:内容会被修剪,并且其余内容是不可见的. scroll :内容会被修剪,但是浏览器会 ...