我正在尝试将 ObjectiveFlickr 框架添加到我的项目中。
我尝试按照以下说明进行操作:
Add ObjectiveFlickr.xcodeproj to your Mac project (from Xcode menu Project > Add to Project...) On your app target, open the info window (using Get Info on the target), then in the General tab, add ObjectiveFlickr (library) to Direct Dependencies Also, in the same window, add CFNetwork.framework to Linked Libraries Drag libObjecitveFlickr.a to the target's Linked Binary With Libraries group
Open the Info window of your target again. Set Configuration to All Configurations, then in the Header Search Paths property, add these two paths, separately (<OF root> is where you checked out ObjectiveFlickr):
<OF root>/Source
<OF root>/LFWebAPIKit
Use #import "ObjectiveFlickr.h" in your project
但是,这些说明似乎是为旧版本的 XCode(我使用 4.6)编写的。我试图将这些说明“翻译”到较新版本的 XCode,但无论我做什么,libObjectiveFlickr.a 都保持红色,并且出现以下错误:
Undefined symbols for architecture armv7:
"_SCNetworkReachabilityUnscheduleFromRunLoop", referenced from:
-[LFSiteReachability stopChecking] in libObjectiveFlickr.a(LFSiteReachability.o)
"_SCNetworkReachabilitySetCallback", referenced from:
-[LFSiteReachability startChecking] in libObjectiveFlickr.a(LFSiteReachability.o)
"_SCNetworkReachabilityCreateWithAddress", referenced from:
-[LFSiteReachability networkConnectivityExists] in libObjectiveFlickr.a(LFSiteReachability.o)
-[LFSiteReachability startChecking] in libObjectiveFlickr.a(LFSiteReachability.o)
"_SCNetworkReachabilityScheduleWithRunLoop", referenced from:
-[LFSiteReachability startChecking] in libObjectiveFlickr.a(LFSiteReachability.o)
"_SCNetworkReachabilityGetFlags", referenced from:
-[LFSiteReachability networkConnectivityExists] in libObjectiveFlickr.a(LFSiteReachability.o)
-[LFSiteReachability startChecking] in libObjectiveFlickr.a(LFSiteReachability.o)
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)