可达性重复符号 [英] Reachability duplicate symbol

查看:269
本文介绍了可达性重复符号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

链接错误:

ld: duplicate symbol _OBJC_METACLASS_$_Reachability in /Users/jmf/Documents/iOS Development/jmf_Client/jmf/jmf/ww_libs/libmfcbroem_ios.a(Reachability.o) and /Users/tpf/Library/Developer/Xcode/DerivedData/jmf-erlknghfcpoomnfanzovahfacgpv/Build/Intermediates/jmf.build/Debug-iphoneos/jmf.build/Objects-normal/armv7/Reachability.o for architecture armv7

如果我只删除h / m文件(希望只使用libmfcbroem_ios.a中的Reachability ...链接器抛出这个:

If I simply remove the h/m files (and associated import directives) in hopes of just using the Reachability in libmfcbroem_ios.a...the linker throws this:

Undefined symbols for architecture armv7:
  "_kReachabilityChangedNotification", referenced from:
      -[MKNetworkEngine initWithHostName:customHeaderFields:] in MKNetworkEngine.o
      -[MKNetworkEngine dealloc] in MKNetworkEngine.o
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)

如何告诉链接器使用a文件中的Reachability?

How can I tell the linker to utilize Reachability from the "a" file?

(免责声明,我刚开始使用ObjC / iOS)

(disclaimer, I'm just getting started with ObjC/iOS)

感谢您的帮助......

Thanks for any help...

推荐答案

删除Reachability.m文件,仅包含标题

Remove the Reachability.m file, include only the header

这篇关于可达性重复符号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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