iphoneconflictreachabilitylayar

Conflict between class and static library


I'm using Layar Player in my app.
It provides a static library to include in your project.
After installing and trying to compile, I got this error:

ld: duplicate symbol _OBJC_CLASS_$_Reachability in //LayarPlayer/Debug/liblayarplayer.a(Reachability.o) and //MyApp.build/Debug-iphoneos/MyApp.build/Objects-normal/armv7/Reachability.o for architecture armv7

I'm using Reachability in my app to check network status, but it seems like it's already included in the library.
I've tried removing every #import Reachability in my code, but obviously I get "undeclared function" errors.
How can I solve this?


Solution

  • I excluded all conflicting .m files from the target and everything is fine now.
    Headers files must not be deleted.