在已有项目中使用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. 将字符“12345”转换成long型

    将字符“12345”转换成long型 解答: String s=”12345″; long num=Long.valueOf(s).longValue();

  2. base 64

    我们的图片大部分都是可以转换成base64编码的data:image. 这个在将canvas保存为img的时候尤其有用.虽然除ie外,大部分现代浏览器都已经支持原生的基于base64的encode和d ...

  3. 【分享】Windows日志查看工具分享

    在Linux下查看日志,使用tail.grep.find等命令还比较方便,后来需要在Windows中处理一些问题,发现缺少类似的功能,比如tailf实时输出,于是在网上收集了一些相关的小工具,希望能够 ...

  4. 在ASP.NET MVC3 中利用JSONP跨域登录WEB系统

    在信息系统开发的时,根据相关业务逻辑难免会多系统之间互相登录.一般情况下我们需要在多系统之间使用多个用户名和密码.这样客户就需要在多个系统之间重复登陆.每次登录都需要输入用户名和密码.最近比较流行的就 ...

  5. (转)QT中QWidget、QDialog及QMainWindow的区别

    QWidget类是所有用户界面对象的基类. 窗口部件是用户界面的一个基本单元:它从窗口系统接收鼠标.键盘和其它事件,并且在屏幕上绘制自己.每一个窗口部件都是矩形的,并且它们按Z轴顺序排列.一个窗口部件 ...

  6. Django model :add a non-nullable field 'SKU' to product without a default; we can't do that

    You are trying to add a non-nullable field 'SKU' to product without a default; we can't do that (the ...

  7. win 8升级win8.1的几个问题

        对于习惯了win7来说的小朋友,win8的使用简直有种想砸电脑的冲动啊,特别是玩游戏的小朋友,win8各种bug.对于游戏.咳咳,我只是多说了,我们都是爱学习的好孩子,少玩游戏,少撸.简单说一 ...

  8. sqlmap注入教程

    1.SQLMAP用于Access数据库注入 (1)猜解是否能注入win: python sqlmap.py -u "http://www.stronkin.com/en/CompHonorB ...

  9. NHibernate 1.0 Released 版本发布了

    NHibernate is a port of Hibernate to the .NET platform. Hibernate is the leading open-source object- ...

  10. python中的json和pickle

    author:headsen chen date::2018-04-10  09:56:54 json模块和pickle模块: 这是用于序列化的两个模块: 概念介绍:json和pickle模块是将数据 ...