Xcode 与 Parse 链接错误
Posted
技术标签:
【中文标题】Xcode 与 Parse 链接错误【英文标题】:Xcode Linking Error with Parse 【发布时间】:2014-05-11 07:53:04 【问题描述】:我已将 Parse 集成到我的一个新应用中,并从我的另一个应用中复制了代码。但现在我得到了这个巨大的错误。我看到很多 Facebook 相关的东西,但我没有使用。
Undefined symbols for architecture i386:
"_ACAccountTypeIdentifierFacebook", referenced from:
+[PF_FBSession renewSystemAuthorization] in Parse(PF_FBSession.o)
"_ACFacebookAppIdKey", referenced from:
-[PF_FBSession authorizeUsingSystemAccountStore:accountType:permissions:defaultAudience:isReauthorize:] in Parse(PF_FBSession.o)
"_ACFacebookAudienceEveryone", referenced from:
-[PF_FBSession authorizeUsingSystemAccountStore:accountType:permissions:defaultAudience:isReauthorize:] in Parse(PF_FBSession.o)
"_ACFacebookAudienceFriends", referenced from:
-[PF_FBSession authorizeUsingSystemAccountStore:accountType:permissions:defaultAudience:isReauthorize:] in Parse(PF_FBSession.o)
"_ACFacebookAudienceKey", referenced from:
-[PF_FBSession authorizeUsingSystemAccountStore:accountType:permissions:defaultAudience:isReauthorize:] in Parse(PF_FBSession.o)
"_ACFacebookAudienceOnlyMe", referenced from:
-[PF_FBSession authorizeUsingSystemAccountStore:accountType:permissions:defaultAudience:isReauthorize:] in Parse(PF_FBSession.o)
"_ACFacebookPermissionsKey", referenced from:
-[PF_FBSession authorizeUsingSystemAccountStore:accountType:permissions:defaultAudience:isReauthorize:] in Parse(PF_FBSession.o)
"_OBJC_CLASS_$_ACAccountStore", referenced from:
objc-class-ref in Parse(PF_FBSession.o)
"_OBJC_CLASS_$_ASIdentifierManager", referenced from:
objc-class-ref in Parse(PF_FBSettings.o)
"_SCNetworkReachabilityCreateWithName", referenced from:
-[PFCommandCache init] in Parse(PFCommandCache.o)
+[PFInternalUtils(Reachability) isParseReachable] in Parse(PFInternalUtils.o)
"_SCNetworkReachabilityGetFlags", referenced from:
-[PFCommandCache init] in Parse(PFCommandCache.o)
+[PFInternalUtils(Reachability) isParseReachable] in Parse(PFInternalUtils.o)
"_SCNetworkReachabilityScheduleWithRunLoop", referenced from:
-[PFCommandCache init] in Parse(PFCommandCache.o)
"_SCNetworkReachabilitySetCallback", referenced from:
-[PFCommandCache init] in Parse(PFCommandCache.o)
"_SCNetworkReachabilityUnscheduleFromRunLoop", referenced from:
-[PFCommandCache dealloc] in Parse(PFCommandCache.o)
"_UTTypeCopyPreferredTagWithClass", referenced from:
-[PFFile getMimeType] in Parse(PFFile.o)
"_UTTypeCreatePreferredIdentifierForTag", referenced from:
-[PFFile getMimeType] in Parse(PFFile.o)
"_kUTTagClassFilenameExtension", referenced from:
-[PFFile getMimeType] in Parse(PFFile.o)
"_kUTTagClassMIMEType", referenced from:
-[PFFile getMimeType] in Parse(PFFile.o)
"_sqlite3_bind_double", referenced from:
-[PF_FBCacheIndex _updateEntryInDatabaseForKey:entry:] in Parse(PF_FBCacheIndex.o)
-[PF_FBCacheIndex _writeEntryInDatabase:] in Parse(PF_FBCacheIndex.o)
"_sqlite3_bind_int", referenced from:
-[PF_FBCacheIndex _updateEntryInDatabaseForKey:entry:] in Parse(PF_FBCacheIndex.o)
-[PF_FBCacheIndex _writeEntryInDatabase:] in Parse(PF_FBCacheIndex.o)
-[PF_FBCacheIndex _trimDatabase] in Parse(PF_FBCacheIndex.o)
"_sqlite3_bind_text", referenced from:
-[PF_FBCacheIndex _updateEntryInDatabaseForKey:entry:] in Parse(PF_FBCacheIndex.o)
-[PF_FBCacheIndex _writeEntryInDatabase:] in Parse(PF_FBCacheIndex.o)
-[PF_FBCacheIndex _readEntryFromDatabase:] in Parse(PF_FBCacheIndex.o)
-[PF_FBCacheIndex _readEntriesFromDatabase:excludingFragment:] in Parse(PF_FBCacheIndex.o)
-[PF_FBCacheIndex _removeEntryFromDatabaseForKey:] in Parse(PF_FBCacheIndex.o)
"_sqlite3_close", referenced from:
___26-[PF_FBCacheIndex dealloc]_block_invoke in Parse(PF_FBCacheIndex.o)
"_sqlite3_column_double", referenced from:
-[PF_FBCacheIndex _createCacheEntityInfo:] in Parse(PF_FBCacheIndex.o)
"_sqlite3_column_int", referenced from:
-[PF_FBCacheIndex _createCacheEntityInfo:] in Parse(PF_FBCacheIndex.o)
-[PF_FBCacheIndex _fetchCurrentDiskUsage] in Parse(PF_FBCacheIndex.o)
-[PF_FBCacheIndex _trimDatabase] in Parse(PF_FBCacheIndex.o)
"_sqlite3_column_text", referenced from:
-[PF_FBCacheIndex _createCacheEntityInfo:] in Parse(PF_FBCacheIndex.o)
-[PF_FBCacheIndex _trimDatabase] in Parse(PF_FBCacheIndex.o)
"_sqlite3_errmsg", referenced from:
_releaseStatement in Parse(PF_FBCacheIndex.o)
-[PF_FBCacheIndex _updateEntryInDatabaseForKey:entry:] in Parse(PF_FBCacheIndex.o)
_initializeStatement in Parse(PF_FBCacheIndex.o)
-[PF_FBCacheIndex _writeEntryInDatabase:] in Parse(PF_FBCacheIndex.o)
-[PF_FBCacheIndex _readEntryFromDatabase:] in Parse(PF_FBCacheIndex.o)
-[PF_FBCacheIndex _readEntriesFromDatabase:excludingFragment:] in Parse(PF_FBCacheIndex.o)
-[PF_FBCacheIndex _fetchCurrentDiskUsage] in Parse(PF_FBCacheIndex.o)
...
"_sqlite3_exec", referenced from:
___39-[PF_FBCacheIndex initWithCacheFolder:]_block_invoke in Parse(PF_FBCacheIndex.o)
"_sqlite3_finalize", referenced from:
_releaseStatement in Parse(PF_FBCacheIndex.o)
"_sqlite3_open_v2", referenced from:
___39-[PF_FBCacheIndex initWithCacheFolder:]_block_invoke in Parse(PF_FBCacheIndex.o)
"_sqlite3_prepare_v2", referenced from:
_initializeStatement in Parse(PF_FBCacheIndex.o)
"_sqlite3_reset", referenced from:
_initializeStatement in Parse(PF_FBCacheIndex.o)
"_sqlite3_step", referenced from:
-[PF_FBCacheIndex _updateEntryInDatabaseForKey:entry:] in Parse(PF_FBCacheIndex.o)
-[PF_FBCacheIndex _writeEntryInDatabase:] in Parse(PF_FBCacheIndex.o)
-[PF_FBCacheIndex _createCacheEntityInfo:] in Parse(PF_FBCacheIndex.o)
-[PF_FBCacheIndex _fetchCurrentDiskUsage] in Parse(PF_FBCacheIndex.o)
-[PF_FBCacheIndex _removeEntryFromDatabaseForKey:] in Parse(PF_FBCacheIndex.o)
-[PF_FBCacheIndex _dropTrimmingTable] in Parse(PF_FBCacheIndex.o)
-[PF_FBCacheIndex _trimDatabase] in Parse(PF_FBCacheIndex.o)
...
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
感谢您的宝贵时间。
【问题讨论】:
你没有按照“入门”——你必须将所有依赖的框架添加到你的项目中。 查看这个答案:***.com/a/18319944/2274694 【参考方案1】:查看有关需要包含哪些库的 Parse QuickStart 信息,并确保已包含这些库。如果还包括其他人,而您不需要它们,请将它们删除。
【讨论】:
我太傻了。我完全忘记了其他框架。我在我的其他应用程序中有它们,但我只是忘记了它们。但是谢谢你:P以上是关于Xcode 与 Parse 链接错误的主要内容,如果未能解决你的问题,请参考以下文章
Xcode 9.2 Objective-C 与 WCSession 的链接器错误
错误:链接器命令失败,退出代码为 1(使用 -v 查看调用)xcode 错误?
在 Xcode 中运行 iOS 单元测试时引用 _main 的链接器错误