Unity 4.6.6 Xcode 'Undefined symbol for armv7/arm64 architecture' 链接器错误
Unity 4.6.6 Xcode 'Undefined symbol for armv7/arm64 architecture' linker errors
我一直在使用 Unity 4.6.6 构建我的 Xcode 项目,但我一直在使用 IL2CPP 时遇到问题。我在构建时 select Player 设置中的通用架构(包括 armv7 和 arm64),在它生成的 Xcode 项目中,在构建时我遇到以下 Mach-O Linker错误。
Undefined symbols for architecture armv7:
"_sqlite3_bind_int", referenced from:
-[SmacBaseDao setSqlBindStatement:entity:colmunInfoList:emptyIsNull:] in libSmacTracking.a(SmacBaseDao.o)
"_sqlite3_errmsg", referenced from:
-[SmacBaseDao execSelectQuery:condition:colmun:transactionDbObj:isTmp:] in libSmacTracking.a(SmacBaseDao.o)
-[SmacBaseDao execInsertQuery:transactionDbObj:isTmp:] in libSmacTracking.a(SmacBaseDao.o)
-[SmacBaseDao execUpdateQuery:condition:emptyIsNull:transactionDbObj:isTmp:] in libSmacTracking.a(SmacBaseDao.o)
-[SmacBaseDao getColmunsInfo:transactionDbObj:] in libSmacTracking.a(SmacBaseDao.o)
-[SmacBaseDao getTableList] in libSmacTracking.a(SmacBaseDao.o)
"_sqlite3_column_int", referenced from:
-[SmacBaseDao getNumber:column:] in libSmacTracking.a(SmacBaseDao.o)
"_sqlite3_open", referenced from:
-[SmacBaseDao dbOpen] in libSmacTracking.a(SmacBaseDao.o)
"_sqlite3_exec", referenced from:
-[SmacBaseDao dbOpen] in libSmacTracking.a(SmacBaseDao.o)
-[SmacBaseDao dbClose:] in libSmacTracking.a(SmacBaseDao.o)
"_OBJC_CLASS_$_NSManagedObjectModel", referenced from:
objc-class-ref in libGoogleAnalyticsServices.a(GAICoreDataUtil.o)
"_sqlite3_prepare_v2", referenced from:
-[SmacUpdate updateDB] in libSmacTracking.a(SmacUpdate.o)
-[SmacBaseDao dbOpen] in libSmacTracking.a(SmacBaseDao.o)
-[SmacBaseDao execSelectQuery:condition:colmun:transactionDbObj:isTmp:] in libSmacTracking.a(SmacBaseDao.o)
-[SmacBaseDao execInsertQuery:transactionDbObj:isTmp:] in libSmacTracking.a(SmacBaseDao.o)
-[SmacBaseDao execUpdateQuery:condition:emptyIsNull:transactionDbObj:isTmp:] in libSmacTracking.a(SmacBaseDao.o)
-[SmacBaseDao getColmunsInfo:transactionDbObj:] in libSmacTracking.a(SmacBaseDao.o)
-[SmacBaseDao getTableList] in libSmacTracking.a(SmacBaseDao.o)
...
"_sqlite3_step", referenced from:
-[SmacUpdate updateDB] in libSmacTracking.a(SmacUpdate.o)
-[SmacBaseDao dbOpen] in libSmacTracking.a(SmacBaseDao.o)
-[SmacBaseDao execSelectQuery:condition:colmun:transactionDbObj:isTmp:] in libSmacTracking.a(SmacBaseDao.o)
-[SmacBaseDao execInsertQuery:transactionDbObj:isTmp:] in libSmacTracking.a(SmacBaseDao.o)
-[SmacBaseDao execUpdateQuery:condition:emptyIsNull:transactionDbObj:isTmp:] in libSmacTracking.a(SmacBaseDao.o)
-[SmacBaseDao getColmunsInfo:transactionDbObj:] in libSmacTracking.a(SmacBaseDao.o)
-[SmacBaseDao getTableList] in libSmacTracking.a(SmacBaseDao.o)
...
"_sqlite3_column_text", referenced from:
-[SmacBaseDao getString:column:] in libSmacTracking.a(SmacBaseDao.o)
-[SmacBaseDao getDateString:column:] in libSmacTracking.a(SmacBaseDao.o)
"_sqlite3_finalize", referenced from:
-[SmacUpdate updateDB] in libSmacTracking.a(SmacUpdate.o)
-[SmacBaseDao dbOpen] in libSmacTracking.a(SmacBaseDao.o)
-[SmacBaseDao execSelectQuery:condition:colmun:transactionDbObj:isTmp:] in libSmacTracking.a(SmacBaseDao.o)
-[SmacBaseDao execInsertQuery:transactionDbObj:isTmp:] in libSmacTracking.a(SmacBaseDao.o)
-[SmacBaseDao execUpdateQuery:condition:emptyIsNull:transactionDbObj:isTmp:] in libSmacTracking.a(SmacBaseDao.o)
-[SmacBaseDao getColmunsInfo:transactionDbObj:] in libSmacTracking.a(SmacBaseDao.o)
"_OBJC_CLASS_$_NSEntityDescription", referenced from:
objc-class-ref in libGoogleAnalyticsServices.a(GAIDataStore.o)
objc-class-ref in libGoogleAnalyticsServices.a(GAICoreDataUtil.o)
"_OBJC_CLASS_$_NSManagedObjectContext", referenced from:
objc-class-ref in libGoogleAnalyticsServices.a(GAIDataStore.o)
"_OBJC_CLASS_$_NSPersistentStoreCoordinator", referenced from:
objc-class-ref in libGoogleAnalyticsServices.a(GAIDataStore.o)
"_kSecReturnData", referenced from:
-[KeychainItemWrapper secItemFormatToDictionary:] in KeychainItemWrapper.o
+[KeychainUtils getStoredValue:serviceName:accessGroup:errorDomain:error:] in KeychainUtils.o
"_kSecMatchLimitOne", referenced from:
-[KeychainItemWrapper initWithIdentifier:serviceName:accessGroup:] in KeychainItemWrapper.o
"_kSecMatchLimit", referenced from:
-[KeychainItemWrapper initWithIdentifier:serviceName:accessGroup:] in KeychainItemWrapper.o
"_OBJC_CLASS_$_NSFetchRequest", referenced from:
objc-class-ref in libGoogleAnalyticsServices.a(GAIDataStore.o)
"_NSOverwriteMergePolicy", referenced from:
-[GAIDataStore contextWithModel:URL:] in libGoogleAnalyticsServices.a(GAIDataStore.o)
"_sqlite3_reset", referenced from:
-[SmacBaseDao execInsertQuery:transactionDbObj:isTmp:] in libSmacTracking.a(SmacBaseDao.o)
-[SmacBaseDao execUpdateQuery:condition:emptyIsNull:transactionDbObj:isTmp:] in libSmacTracking.a(SmacBaseDao.o)
"_kSecClassGenericPassword", referenced from:
-[KeychainItemWrapper initWithIdentifier:serviceName:accessGroup:] in KeychainItemWrapper.o
-[KeychainItemWrapper dictionaryToSecItemFormat:] in KeychainItemWrapper.o
-[KeychainItemWrapper secItemFormatToDictionary:] in KeychainItemWrapper.o
+[KeychainUtils getStoredValue:serviceName:accessGroup:errorDomain:error:] in KeychainUtils.o
+[KeychainUtils setValue:key:servicename:accessGroup:force:errorDomain:error:] in KeychainUtils.o
+[KeychainUtils deleteValue:serviceName:accessGroup:errorDomain:error:] in KeychainUtils.o
"_OBJC_CLASS_$_NSAttributeDescription", referenced from:
objc-class-ref in libGoogleAnalyticsServices.a(GAICoreDataUtil.o)
"_kSecAttrService", referenced from:
-[KeychainItemWrapper initWithIdentifier:serviceName:accessGroup:] in KeychainItemWrapper.o
+[KeychainUtils getStoredValue:serviceName:accessGroup:errorDomain:error:] in KeychainUtils.o
+[KeychainUtils setValue:key:servicename:accessGroup:force:errorDomain:error:] in KeychainUtils.o
+[KeychainUtils deleteValue:serviceName:accessGroup:errorDomain:error:] in KeychainUtils.o
"_kSecAttrLabel", referenced from:
-[KeychainItemWrapper resetKeychainItem] in KeychainItemWrapper.o
+[KeychainUtils setValue:key:servicename:accessGroup:force:errorDomain:error:] in KeychainUtils.o
"_NSSQLiteStoreType", referenced from:
-[GAIDataStore coordinatorWithModel:URL:] in libGoogleAnalyticsServices.a(GAIDataStore.o)
"_NSSQLiteErrorDomain", referenced from:
-[GAIDataStore performBlockAndWait:withError:] in libGoogleAnalyticsServices.a(GAIDataStore.o)
"_sqlite3_bind_null", referenced from:
-[SmacBaseDao setSqlBindStatement:entity:colmunInfoList:emptyIsNull:] in libSmacTracking.a(SmacBaseDao.o)
"_kSecClass", referenced from:
-[KeychainItemWrapper initWithIdentifier:serviceName:accessGroup:] in KeychainItemWrapper.o
-[KeychainItemWrapper dictionaryToSecItemFormat:] in KeychainItemWrapper.o
-[KeychainItemWrapper secItemFormatToDictionary:] in KeychainItemWrapper.o
-[KeychainItemWrapper writeToKeychain] in KeychainItemWrapper.o
+[KeychainUtils getStoredValue:serviceName:accessGroup:errorDomain:error:] in KeychainUtils.o
+[KeychainUtils setValue:key:servicename:accessGroup:force:errorDomain:error:] in KeychainUtils.o
+[KeychainUtils deleteValue:serviceName:accessGroup:errorDomain:error:] in KeychainUtils.o
...
"_kSecAttrGeneric", referenced from:
-[KeychainItemWrapper initWithIdentifier:serviceName:accessGroup:] in KeychainItemWrapper.o
"_kSecAttrAccount", referenced from:
-[KeychainItemWrapper initWithIdentifier:serviceName:accessGroup:] in KeychainItemWrapper.o
+[KeychainUtils getStoredValue:serviceName:accessGroup:errorDomain:error:] in KeychainUtils.o
+[KeychainUtils setValue:key:servicename:accessGroup:force:errorDomain:error:] in KeychainUtils.o
+[KeychainUtils deleteValue:serviceName:accessGroup:errorDomain:error:] in KeychainUtils.o
"_kSecValueData", referenced from:
-[KeychainItemWrapper resetKeychainItem] in KeychainItemWrapper.o
-[KeychainItemWrapper dictionaryToSecItemFormat:] in KeychainItemWrapper.o
-[KeychainItemWrapper secItemFormatToDictionary:] in KeychainItemWrapper.o
+[KeychainUtils setValue:key:servicename:accessGroup:force:errorDomain:error:] in KeychainUtils.o
"_kSecAttrAccessGroup", referenced from:
-[KeychainItemWrapper initWithIdentifier:serviceName:accessGroup:] in KeychainItemWrapper.o
+[KeychainUtils getStoredValue:serviceName:accessGroup:errorDomain:error:] in KeychainUtils.o
+[KeychainUtils setValue:key:servicename:accessGroup:force:errorDomain:error:] in KeychainUtils.o
+[KeychainUtils deleteValue:serviceName:accessGroup:errorDomain:error:] in KeychainUtils.o
"_SecItemUpdate", referenced from:
-[KeychainItemWrapper writeToKeychain] in KeychainItemWrapper.o
+[KeychainUtils setValue:key:servicename:accessGroup:force:errorDomain:error:] in KeychainUtils.o
"_OBJC_CLASS_$_SKProductsRequest", referenced from:
objc-class-ref in AppStoreProcess.o
"_sqlite3_bind_text", referenced from:
-[SmacBaseDao setSqlBindStatement:entity:colmunInfoList:emptyIsNull:] in libSmacTracking.a(SmacBaseDao.o)
"_SecItemCopyMatching", referenced from:
-[KeychainItemWrapper initWithIdentifier:serviceName:accessGroup:] in KeychainItemWrapper.o
-[KeychainItemWrapper secItemFormatToDictionary:] in KeychainItemWrapper.o
-[KeychainItemWrapper writeToKeychain] in KeychainItemWrapper.o
+[KeychainUtils getStoredValue:serviceName:accessGroup:errorDomain:error:] in KeychainUtils.o
"_sqlite3_close", referenced from:
-[SmacBaseDao dbClose:] in libSmacTracking.a(SmacBaseDao.o)
"_SecItemAdd", referenced from:
-[KeychainItemWrapper writeToKeychain] in KeychainItemWrapper.o
+[KeychainUtils setValue:key:servicename:accessGroup:force:errorDomain:error:] in KeychainUtils.o
"_SecItemDelete", referenced from:
-[KeychainItemWrapper resetKeychainItem] in KeychainItemWrapper.o
+[KeychainUtils deleteValue:serviceName:accessGroup:errorDomain:error:] in KeychainUtils.o
"_OBJC_CLASS_$_SKPayment", referenced from:
objc-class-ref in AppStoreProcess.o
"_kSecReturnAttributes", referenced from:
-[KeychainItemWrapper initWithIdentifier:serviceName:accessGroup:] in KeychainItemWrapper.o
+[KeychainUtils getStoredValue:serviceName:accessGroup:errorDomain:error:] in KeychainUtils.o
+[KeychainUtils deleteValue:serviceName:accessGroup:errorDomain:error:] in KeychainUtils.o
"_kSecAttrDescription", referenced from:
-[KeychainItemWrapper resetKeychainItem] in KeychainItemWrapper.o
"_OBJC_CLASS_$_SKPaymentQueue", referenced from:
objc-class-ref in AppStoreProcess.o
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
我已经阅读了一些关于 "Undefined symbols for architecture armv7" 的问题和答案,例如 this one 但顶部答案中建议的解决方案并不真正适用,因为在我的情况下是 Unity 将所需的文件放入Xcode 项目文件夹。此外,经检查,错误查找的库已正确添加到构建阶段的 Link 二进制文件 部分。
如果我做错了什么,有人可以帮助或启发我吗?
我也尝试 select 在 Unity Player 设置中仅使用 armv7 或仅使用 arm64 来使用 IL2CPP 进行构建,但我仍然得到 "Undefined symbols for armv7" 或 "Undefined symbols for arm64" Mach-O Linker 错误分别在 Xcode.
使用的软件:
Unity 4.6.6、Xcode 6.1(尝试升级到 6.3)和 iOS 8.1 基础 SDK
查看 libsqlite3.dylib 是否已添加到您的所有目标。
我一直在使用 Unity 4.6.6 构建我的 Xcode 项目,但我一直在使用 IL2CPP 时遇到问题。我在构建时 select Player 设置中的通用架构(包括 armv7 和 arm64),在它生成的 Xcode 项目中,在构建时我遇到以下 Mach-O Linker错误。
Undefined symbols for architecture armv7: "_sqlite3_bind_int", referenced from: -[SmacBaseDao setSqlBindStatement:entity:colmunInfoList:emptyIsNull:] in libSmacTracking.a(SmacBaseDao.o) "_sqlite3_errmsg", referenced from: -[SmacBaseDao execSelectQuery:condition:colmun:transactionDbObj:isTmp:] in libSmacTracking.a(SmacBaseDao.o) -[SmacBaseDao execInsertQuery:transactionDbObj:isTmp:] in libSmacTracking.a(SmacBaseDao.o) -[SmacBaseDao execUpdateQuery:condition:emptyIsNull:transactionDbObj:isTmp:] in libSmacTracking.a(SmacBaseDao.o) -[SmacBaseDao getColmunsInfo:transactionDbObj:] in libSmacTracking.a(SmacBaseDao.o) -[SmacBaseDao getTableList] in libSmacTracking.a(SmacBaseDao.o) "_sqlite3_column_int", referenced from: -[SmacBaseDao getNumber:column:] in libSmacTracking.a(SmacBaseDao.o) "_sqlite3_open", referenced from: -[SmacBaseDao dbOpen] in libSmacTracking.a(SmacBaseDao.o) "_sqlite3_exec", referenced from: -[SmacBaseDao dbOpen] in libSmacTracking.a(SmacBaseDao.o) -[SmacBaseDao dbClose:] in libSmacTracking.a(SmacBaseDao.o) "_OBJC_CLASS_$_NSManagedObjectModel", referenced from: objc-class-ref in libGoogleAnalyticsServices.a(GAICoreDataUtil.o) "_sqlite3_prepare_v2", referenced from: -[SmacUpdate updateDB] in libSmacTracking.a(SmacUpdate.o) -[SmacBaseDao dbOpen] in libSmacTracking.a(SmacBaseDao.o) -[SmacBaseDao execSelectQuery:condition:colmun:transactionDbObj:isTmp:] in libSmacTracking.a(SmacBaseDao.o) -[SmacBaseDao execInsertQuery:transactionDbObj:isTmp:] in libSmacTracking.a(SmacBaseDao.o) -[SmacBaseDao execUpdateQuery:condition:emptyIsNull:transactionDbObj:isTmp:] in libSmacTracking.a(SmacBaseDao.o) -[SmacBaseDao getColmunsInfo:transactionDbObj:] in libSmacTracking.a(SmacBaseDao.o) -[SmacBaseDao getTableList] in libSmacTracking.a(SmacBaseDao.o) ... "_sqlite3_step", referenced from: -[SmacUpdate updateDB] in libSmacTracking.a(SmacUpdate.o) -[SmacBaseDao dbOpen] in libSmacTracking.a(SmacBaseDao.o) -[SmacBaseDao execSelectQuery:condition:colmun:transactionDbObj:isTmp:] in libSmacTracking.a(SmacBaseDao.o) -[SmacBaseDao execInsertQuery:transactionDbObj:isTmp:] in libSmacTracking.a(SmacBaseDao.o) -[SmacBaseDao execUpdateQuery:condition:emptyIsNull:transactionDbObj:isTmp:] in libSmacTracking.a(SmacBaseDao.o) -[SmacBaseDao getColmunsInfo:transactionDbObj:] in libSmacTracking.a(SmacBaseDao.o) -[SmacBaseDao getTableList] in libSmacTracking.a(SmacBaseDao.o) ... "_sqlite3_column_text", referenced from: -[SmacBaseDao getString:column:] in libSmacTracking.a(SmacBaseDao.o) -[SmacBaseDao getDateString:column:] in libSmacTracking.a(SmacBaseDao.o) "_sqlite3_finalize", referenced from: -[SmacUpdate updateDB] in libSmacTracking.a(SmacUpdate.o) -[SmacBaseDao dbOpen] in libSmacTracking.a(SmacBaseDao.o) -[SmacBaseDao execSelectQuery:condition:colmun:transactionDbObj:isTmp:] in libSmacTracking.a(SmacBaseDao.o) -[SmacBaseDao execInsertQuery:transactionDbObj:isTmp:] in libSmacTracking.a(SmacBaseDao.o) -[SmacBaseDao execUpdateQuery:condition:emptyIsNull:transactionDbObj:isTmp:] in libSmacTracking.a(SmacBaseDao.o) -[SmacBaseDao getColmunsInfo:transactionDbObj:] in libSmacTracking.a(SmacBaseDao.o) "_OBJC_CLASS_$_NSEntityDescription", referenced from: objc-class-ref in libGoogleAnalyticsServices.a(GAIDataStore.o) objc-class-ref in libGoogleAnalyticsServices.a(GAICoreDataUtil.o) "_OBJC_CLASS_$_NSManagedObjectContext", referenced from: objc-class-ref in libGoogleAnalyticsServices.a(GAIDataStore.o) "_OBJC_CLASS_$_NSPersistentStoreCoordinator", referenced from: objc-class-ref in libGoogleAnalyticsServices.a(GAIDataStore.o) "_kSecReturnData", referenced from: -[KeychainItemWrapper secItemFormatToDictionary:] in KeychainItemWrapper.o +[KeychainUtils getStoredValue:serviceName:accessGroup:errorDomain:error:] in KeychainUtils.o "_kSecMatchLimitOne", referenced from: -[KeychainItemWrapper initWithIdentifier:serviceName:accessGroup:] in KeychainItemWrapper.o "_kSecMatchLimit", referenced from: -[KeychainItemWrapper initWithIdentifier:serviceName:accessGroup:] in KeychainItemWrapper.o "_OBJC_CLASS_$_NSFetchRequest", referenced from: objc-class-ref in libGoogleAnalyticsServices.a(GAIDataStore.o) "_NSOverwriteMergePolicy", referenced from: -[GAIDataStore contextWithModel:URL:] in libGoogleAnalyticsServices.a(GAIDataStore.o) "_sqlite3_reset", referenced from: -[SmacBaseDao execInsertQuery:transactionDbObj:isTmp:] in libSmacTracking.a(SmacBaseDao.o) -[SmacBaseDao execUpdateQuery:condition:emptyIsNull:transactionDbObj:isTmp:] in libSmacTracking.a(SmacBaseDao.o) "_kSecClassGenericPassword", referenced from: -[KeychainItemWrapper initWithIdentifier:serviceName:accessGroup:] in KeychainItemWrapper.o -[KeychainItemWrapper dictionaryToSecItemFormat:] in KeychainItemWrapper.o -[KeychainItemWrapper secItemFormatToDictionary:] in KeychainItemWrapper.o +[KeychainUtils getStoredValue:serviceName:accessGroup:errorDomain:error:] in KeychainUtils.o +[KeychainUtils setValue:key:servicename:accessGroup:force:errorDomain:error:] in KeychainUtils.o +[KeychainUtils deleteValue:serviceName:accessGroup:errorDomain:error:] in KeychainUtils.o "_OBJC_CLASS_$_NSAttributeDescription", referenced from: objc-class-ref in libGoogleAnalyticsServices.a(GAICoreDataUtil.o) "_kSecAttrService", referenced from: -[KeychainItemWrapper initWithIdentifier:serviceName:accessGroup:] in KeychainItemWrapper.o +[KeychainUtils getStoredValue:serviceName:accessGroup:errorDomain:error:] in KeychainUtils.o +[KeychainUtils setValue:key:servicename:accessGroup:force:errorDomain:error:] in KeychainUtils.o +[KeychainUtils deleteValue:serviceName:accessGroup:errorDomain:error:] in KeychainUtils.o "_kSecAttrLabel", referenced from: -[KeychainItemWrapper resetKeychainItem] in KeychainItemWrapper.o +[KeychainUtils setValue:key:servicename:accessGroup:force:errorDomain:error:] in KeychainUtils.o "_NSSQLiteStoreType", referenced from: -[GAIDataStore coordinatorWithModel:URL:] in libGoogleAnalyticsServices.a(GAIDataStore.o) "_NSSQLiteErrorDomain", referenced from: -[GAIDataStore performBlockAndWait:withError:] in libGoogleAnalyticsServices.a(GAIDataStore.o) "_sqlite3_bind_null", referenced from: -[SmacBaseDao setSqlBindStatement:entity:colmunInfoList:emptyIsNull:] in libSmacTracking.a(SmacBaseDao.o) "_kSecClass", referenced from: -[KeychainItemWrapper initWithIdentifier:serviceName:accessGroup:] in KeychainItemWrapper.o -[KeychainItemWrapper dictionaryToSecItemFormat:] in KeychainItemWrapper.o -[KeychainItemWrapper secItemFormatToDictionary:] in KeychainItemWrapper.o -[KeychainItemWrapper writeToKeychain] in KeychainItemWrapper.o +[KeychainUtils getStoredValue:serviceName:accessGroup:errorDomain:error:] in KeychainUtils.o +[KeychainUtils setValue:key:servicename:accessGroup:force:errorDomain:error:] in KeychainUtils.o +[KeychainUtils deleteValue:serviceName:accessGroup:errorDomain:error:] in KeychainUtils.o ... "_kSecAttrGeneric", referenced from: -[KeychainItemWrapper initWithIdentifier:serviceName:accessGroup:] in KeychainItemWrapper.o "_kSecAttrAccount", referenced from: -[KeychainItemWrapper initWithIdentifier:serviceName:accessGroup:] in KeychainItemWrapper.o +[KeychainUtils getStoredValue:serviceName:accessGroup:errorDomain:error:] in KeychainUtils.o +[KeychainUtils setValue:key:servicename:accessGroup:force:errorDomain:error:] in KeychainUtils.o +[KeychainUtils deleteValue:serviceName:accessGroup:errorDomain:error:] in KeychainUtils.o "_kSecValueData", referenced from: -[KeychainItemWrapper resetKeychainItem] in KeychainItemWrapper.o -[KeychainItemWrapper dictionaryToSecItemFormat:] in KeychainItemWrapper.o -[KeychainItemWrapper secItemFormatToDictionary:] in KeychainItemWrapper.o +[KeychainUtils setValue:key:servicename:accessGroup:force:errorDomain:error:] in KeychainUtils.o "_kSecAttrAccessGroup", referenced from: -[KeychainItemWrapper initWithIdentifier:serviceName:accessGroup:] in KeychainItemWrapper.o +[KeychainUtils getStoredValue:serviceName:accessGroup:errorDomain:error:] in KeychainUtils.o +[KeychainUtils setValue:key:servicename:accessGroup:force:errorDomain:error:] in KeychainUtils.o +[KeychainUtils deleteValue:serviceName:accessGroup:errorDomain:error:] in KeychainUtils.o "_SecItemUpdate", referenced from: -[KeychainItemWrapper writeToKeychain] in KeychainItemWrapper.o +[KeychainUtils setValue:key:servicename:accessGroup:force:errorDomain:error:] in KeychainUtils.o "_OBJC_CLASS_$_SKProductsRequest", referenced from: objc-class-ref in AppStoreProcess.o "_sqlite3_bind_text", referenced from: -[SmacBaseDao setSqlBindStatement:entity:colmunInfoList:emptyIsNull:] in libSmacTracking.a(SmacBaseDao.o) "_SecItemCopyMatching", referenced from: -[KeychainItemWrapper initWithIdentifier:serviceName:accessGroup:] in KeychainItemWrapper.o -[KeychainItemWrapper secItemFormatToDictionary:] in KeychainItemWrapper.o -[KeychainItemWrapper writeToKeychain] in KeychainItemWrapper.o +[KeychainUtils getStoredValue:serviceName:accessGroup:errorDomain:error:] in KeychainUtils.o "_sqlite3_close", referenced from: -[SmacBaseDao dbClose:] in libSmacTracking.a(SmacBaseDao.o) "_SecItemAdd", referenced from: -[KeychainItemWrapper writeToKeychain] in KeychainItemWrapper.o +[KeychainUtils setValue:key:servicename:accessGroup:force:errorDomain:error:] in KeychainUtils.o "_SecItemDelete", referenced from: -[KeychainItemWrapper resetKeychainItem] in KeychainItemWrapper.o +[KeychainUtils deleteValue:serviceName:accessGroup:errorDomain:error:] in KeychainUtils.o "_OBJC_CLASS_$_SKPayment", referenced from: objc-class-ref in AppStoreProcess.o "_kSecReturnAttributes", referenced from: -[KeychainItemWrapper initWithIdentifier:serviceName:accessGroup:] in KeychainItemWrapper.o +[KeychainUtils getStoredValue:serviceName:accessGroup:errorDomain:error:] in KeychainUtils.o +[KeychainUtils deleteValue:serviceName:accessGroup:errorDomain:error:] in KeychainUtils.o "_kSecAttrDescription", referenced from: -[KeychainItemWrapper resetKeychainItem] in KeychainItemWrapper.o "_OBJC_CLASS_$_SKPaymentQueue", referenced from: objc-class-ref in AppStoreProcess.o ld: symbol(s) not found for architecture armv7 clang: error: linker command failed with exit code 1 (use -v to see invocation)
我已经阅读了一些关于 "Undefined symbols for architecture armv7" 的问题和答案,例如 this one 但顶部答案中建议的解决方案并不真正适用,因为在我的情况下是 Unity 将所需的文件放入Xcode 项目文件夹。此外,经检查,错误查找的库已正确添加到构建阶段的 Link 二进制文件 部分。
如果我做错了什么,有人可以帮助或启发我吗?
我也尝试 select 在 Unity Player 设置中仅使用 armv7 或仅使用 arm64 来使用 IL2CPP 进行构建,但我仍然得到 "Undefined symbols for armv7" 或 "Undefined symbols for arm64" Mach-O Linker 错误分别在 Xcode.
使用的软件: Unity 4.6.6、Xcode 6.1(尝试升级到 6.3)和 iOS 8.1 基础 SDK
查看 libsqlite3.dylib 是否已添加到您的所有目标。