可达性重复符号

时间:2012-06-14 07:47:12

标签: objective-c ios ios5

链接错误:

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文件(以及相关的import指令),希望只使用libmfcbroem_ios.a中的Reachability ...链接器抛出这个:

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?

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

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

1 个答案:

答案 0 :(得分:19)

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