我有我的静态库 在这个项目中,我添加了一个Reachability.h .m文件。 所以,我有一些链接器错误: 我还添加了CFNetwork和System.Configuration框架
Undefined symbols for architecture i386:
"_SCNetworkReachabilityCreateWithAddress", referenced from:
+[Reachability reachabilityWithAddress:] in libAdvertisingPromotions.a(Reachability.o)
"_SCNetworkReachabilityCreateWithName", referenced from:
+[Reachability reachabilityWithHostName:] in libAdvertisingPromotions.a(Reachability.o)
"_SCNetworkReachabilityGetFlags", referenced from:
-[Reachability connectionRequired] in libAdvertisingPromotions.a(Reachability.o)
-[Reachability currentReachabilityStatus] in libAdvertisingPromotions.a(Reachability.o)
"_SCNetworkReachabilityScheduleWithRunLoop", referenced from:
-[Reachability startNotifier] in libAdvertisingPromotions.a(Reachability.o)
"_SCNetworkReachabilitySetCallback", referenced from:
-[Reachability startNotifier] in libAdvertisingPromotions.a(Reachability.o)
"_SCNetworkReachabilityUnscheduleFromRunLoop", referenced from:
-[Reachability stopNotifier] in libAdvertisingPromotions.a(Reachability.o)
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
答案 0 :(得分:1)
我已经解决了这个...... 我在使用我的静态库
的测试应用程序项目中添加了systemconfiguration.framework答案 1 :(得分:0)
您必须确定您的Reachability.h .m已被编译。您需要转到“Build Phases”,然后转到“Compile SOurces”并添加Reachability.m来编译源代码。