Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Reachability duplicate symbol

Error on link:

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

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)

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

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

Thanks for any help...

like image 303
Jimmy_m Avatar asked Jun 14 '12 07:06

Jimmy_m


1 Answers

Remove the Reachability.m file, include only the header

like image 138
Jesús A. Álvarez Avatar answered Sep 20 '22 03:09

Jesús A. Álvarez