6

链接错误:

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 中的可达性......链接器会抛出这个:

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”文件中的可达性?

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

谢谢你的帮助...

4

1 回答 1

20

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

于 2012-06-14T07:50:02.023 回答