iphoneduplicatessharekit

Duplicate symbol error with ReachabilityRef on the iPhone


I am using ShareKit and BCFads sdk in my iPhone app. When I build the app, I've got an duplicate symbol error.

ld: duplicate symbol _OBJC_IVAR_$_Reachability.reachabilityRef in /BCFAds/BCFAds.a(Reachability.o) and /Debug-iphonesimulator/libShareKit.a(Reachability.o) for architecture i386
collect2: ld returned 1 exit status
Command /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/llvm-g++-4.2 failed with exit code 1

This problem comes from ReachabilityRef. It is defined in the Reachability.m of the sharekit.

@interface Reachability: NSObject
{
 BOOL localWiFiRef;
 SCNetworkReachabilityRef reachabilityRef;
}

Any idea?


Solution

  • Check in your project if you have 2 Reachability.{h/m} hope this help you.