我在我的项目中包含了标有“Flurry”的文件夹。我在 AppDelegate.m 中添加了以下行:
#import "Flurry.h"
- (void)applicationDidFinishLaunching:(UIApplication *)application
{
[Flurry startSession:@"my_key"];
}
但是,尝试运行后出现 7 个错误。
Undefined symbols for architecture i386:
"_SCNetworkReachabilityCreateWithAddress", referenced from:
+[FlurryReachability flurryReachabilityWithAddress:] in libFlurry.a(libFlurry.a-i386-master.o)
"_SCNetworkReachabilityCreateWithName", referenced from:
+[FlurryReachability flurryReachabilityWithHostName:] in libFlurry.a(libFlurry.a-i386-master.o)
"_SCNetworkReachabilityGetFlags", referenced from:
-[FlurryReachability flurryCurrentReachabilityStatus] in libFlurry.a(libFlurry.a-i386-master.o)
-[FlurryReachability isFlurryReachable] in libFlurry.a(libFlurry.a-i386-master.o)
-[FlurryReachability isFlurryConnectionRequired] in libFlurry.a(libFlurry.a-i386-master.o)
-[FlurryReachability isFlurryConnectionOnDemand] in libFlurry.a(libFlurry.a-i386-master.o)
-[FlurryReachability isFlurryUserInterventionRequired] in libFlurry.a(libFlurry.a-i386-master.o)
-[FlurryReachability isFlurryReachableViaWWAN] in libFlurry.a(libFlurry.a-i386-master.o)
-[FlurryReachability isFlurryReachableViaWiFi] in libFlurry.a(libFlurry.a-i386-master.o)
...
"_SCNetworkReachabilityScheduleWithRunLoop", referenced from:
-[FlurryReachability flurryStartNotifier] in libFlurry.a(libFlurry.a-i386-master.o)
"_SCNetworkReachabilitySetCallback", referenced from:
-[FlurryReachability flurryStartNotifier] in libFlurry.a(libFlurry.a-i386-master.o)
"_SCNetworkReachabilityUnscheduleFromRunLoop", referenced from:
-[FlurryReachability flurryStopNotifier] in libFlurry.a(libFlurry.a-i386-master.o)
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)