gpt4 book ai didi

ios - Estimote SDK 的 undefined symbol 链接器失败

转载 作者:行者123 更新时间:2023-11-29 02:12:14 25 4
gpt4 key购买 nike

我正在尝试将 Estimote SDK 3.0 包含到我的项目中,但出现以下链接错误:

Undefined symbols for architecture arm64:
"_OBJC_CLASS_$_ESTBeaconRegionWrapper", referenced from:
objc-class-ref in EstimoteSDK(ESTSecureBeaconManager.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

我已将框架添加到“构建阶段”并检查框架搜索目录设置是否包含该目录。

我从 Estimote 下载了示例应用程序,它使用了相同的框架(这是我从中复制的)并且构建良好。我看不出任何明显的区别。

我怎样才能找出问题所在?

编辑:我正在使用 Xcode 6.2。我正在为 iPhone 6 构建(架构为 arm64、armv7、armv7s)。在我为 armv7s 构建下面的问题之后,我得到了同样的错误(对于 armv7s)。所以肯定是链接Framework有问题。

编辑 2:我删除了 -ObjC 'Other linker flag',因为将其添加到 Estimote 项目会产生相同的错误。但是现在我得到了更多的错误:

Ld /Users/.../iDomsPortalDev normal arm64
cd "/Users/.../idoms-portal"
export IPHONEOS_DEPLOYMENT_TARGET=7.0
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.2.sdk -L/Users/.../Products/Debug-iphoneos -F/Users/.../Products/Debug-iphoneos -FiDoms/frameworks -F/Applications/Xcode.app/Contents/Developer/Library/Frameworks -filelist /Users/.../Debug-iphoneos/iDoms\ Dev.build/Objects-normal/arm64/iDomsPortalDev.LinkFileList -Xlinker -rpath -Xlinker @executable_path/Frameworks -dead_strip -lxml2 -lc++ -fobjc-arc -fobjc-link-runtime -miphoneos-version-min=7.0 -framework CrashReporter -framework EstimoteSDK -weak_framework Accelerate -weak_framework Social -weak_framework Twitter -framework MessageUI -framework MapKit -framework AVFoundation -framework SystemConfiguration -framework MediaPlayer -framework QuartzCore -framework UIKit -framework Foundation -framework CoreGraphics -framework CoreData -framework CoreLocation -Xlinker -dependency_info -Xlinker /Users/.../Debug-iphoneos/iDoms\ Dev.build/Objects-normal/arm64/iDomsPortalDev_dependency_info.dat -o /Users/.../iDomsPortalDev

Undefined symbols for architecture arm64:
"_CBAdvertisementDataServiceDataKey", referenced from:
+[ESTDeviceDataHelper parseAdvertisingData:] in EstimoteSDK(ESTDeviceDataHelper.o)
"_OBJC_CLASS_$_CBCentralManager", referenced from:
objc-class-ref in EstimoteSDK(ESTBeaconDevice.o)
"_kSecAttrService", referenced from:
-[ESTKeychain dataForKey:] in EstimoteSDK(ESTKeychain.o)
-[ESTKeychain setObject:forKey:] in EstimoteSDK(ESTKeychain.o)
+[ESTKeychain bundleSeedID] in EstimoteSDK(ESTKeychain.o)
"_kSecAttrAccessibleAfterFirstUnlock", referenced from:
-[ESTKeychain setObject:forKey:] in EstimoteSDK(ESTKeychain.o)
"_OBJC_CLASS_$_CBUUID", referenced from:
objc-class-ref in EstimoteSDK(ESTBeaconDevice.o)
objc-class-ref in EstimoteSDK(ESTBluetoothServiceAuth.o)
objc-class-ref in EstimoteSDK(ESTBluetoothServiceEstimote.o)
objc-class-ref in EstimoteSDK(ESTBluetoothServiceOta.o)
objc-class-ref in EstimoteSDK(ESTBluetoothServiceSoftware.o)
objc-class-ref in EstimoteSDK(ETBluetoothMath.o)
"_kSecAttrAccessibleWhenUnlocked", referenced from:
-[ESTKeychain setObject:forKey:] in EstimoteSDK(ESTKeychain.o)
"_kSecReturnAttributes", referenced from:
+[ESTKeychain bundleSeedID] in EstimoteSDK(ESTKeychain.o)
"_kSecAttrAccessible", referenced from:
-[ESTKeychain setObject:forKey:] in EstimoteSDK(ESTKeychain.o)
"_kSecAttrAccessibleAlways", referenced from:
-[ESTKeychain setObject:forKey:] in EstimoteSDK(ESTKeychain.o)
"_CBCentralManagerScanOptionAllowDuplicatesKey", referenced from:
-[ESTBeaconDevice startScanning] in EstimoteSDK(ESTBeaconDevice.o)
"_SecItemDelete", referenced from:
-[ESTKeychain setObject:forKey:] in EstimoteSDK(ESTKeychain.o)
"_kSecAttrAccessibleAfterFirstUnlockThisDeviceOnly", referenced from:
-[ESTKeychain setObject:forKey:] in EstimoteSDK(ESTKeychain.o)
"_kSecAttrAccessibleAlwaysThisDeviceOnly", referenced from:
-[ESTKeychain setObject:forKey:] in EstimoteSDK(ESTKeychain.o)
"_SecItemUpdate", referenced from:
-[ESTKeychain setObject:forKey:] in EstimoteSDK(ESTKeychain.o)
"_kSecAttrAccessibleWhenUnlockedThisDeviceOnly", referenced from:
-[ESTKeychain setObject:forKey:] in EstimoteSDK(ESTKeychain.o)
"_SecItemAdd", referenced from:
-[ESTKeychain setObject:forKey:] in EstimoteSDK(ESTKeychain.o)
+[ESTKeychain bundleSeedID] in EstimoteSDK(ESTKeychain.o)
"_SecItemCopyMatching", referenced from:
-[ESTKeychain dataForKey:] in EstimoteSDK(ESTKeychain.o)
+[ESTKeychain bundleSeedID] in EstimoteSDK(ESTKeychain.o)
"_kSecClass", referenced from:
-[ESTKeychain dataForKey:] in EstimoteSDK(ESTKeychain.o)
-[ESTKeychain setObject:forKey:] in EstimoteSDK(ESTKeychain.o)
+[ESTKeychain bundleSeedID] in EstimoteSDK(ESTKeychain.o)
"_kSecClassGenericPassword", referenced from:
-[ESTKeychain dataForKey:] in EstimoteSDK(ESTKeychain.o)
-[ESTKeychain setObject:forKey:] in EstimoteSDK(ESTKeychain.o)
+[ESTKeychain bundleSeedID] in EstimoteSDK(ESTKeychain.o)
"_kSecAttrAccount", referenced from:
-[ESTKeychain dataForKey:] in EstimoteSDK(ESTKeychain.o)
-[ESTKeychain setObject:forKey:] in EstimoteSDK(ESTKeychain.o)
+[ESTKeychain bundleSeedID] in EstimoteSDK(ESTKeychain.o)
"_kSecValueData", referenced from:
-[ESTKeychain setObject:forKey:] in EstimoteSDK(ESTKeychain.o)
"_kSecAttrAccessGroup", referenced from:
-[ESTKeychain dataForKey:] in EstimoteSDK(ESTKeychain.o)
-[ESTKeychain setObject:forKey:] in EstimoteSDK(ESTKeychain.o)
+[ESTKeychain bundleSeedID] in EstimoteSDK(ESTKeychain.o)
"_kSecMatchLimitOne", referenced from:
-[ESTKeychain dataForKey:] in EstimoteSDK(ESTKeychain.o)
"_kSecMatchLimit", referenced from:
-[ESTKeychain dataForKey:] in EstimoteSDK(ESTKeychain.o)
"_kSecReturnData", referenced from:
-[ESTKeychain dataForKey:] in EstimoteSDK(ESTKeychain.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

[编辑 3:]添加 Security.framework 后,它似乎又迈出了一步:

Ld /Users/.../Products/Debug-iphoneos/iDomsPortalDev.app/iDomsPortalDev normal arm64
cd "/Users/.../idoms-portal"
export IPHONEOS_DEPLOYMENT_TARGET=7.0
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.2.sdk -L/Users/.../Products/Debug-iphoneos -F/Users/.../Library/Frameworks -filelist /Users/.../iDoms.build/Debug-iphoneos/iDoms\ Dev.build/Objects-normal/arm64/iDomsPortalDev.LinkFileList -Xlinker -rpath -Xlinker @executable_path/Frameworks -dead_strip -lxml2 -fobjc-arc -fobjc-link-runtime -miphoneos-version-min=7.0 -framework Security -framework CrashReporter -framework EstimoteSDK -weak_framework Accelerate -weak_framework Social -weak_framework Twitter -framework MessageUI -framework MapKit -framework AVFoundation -framework SystemConfiguration -framework MediaPlayer -framework QuartzCore -framework UIKit -framework Foundation -framework CoreGraphics -framework CoreData -framework CoreLocation -Xlinker -dependency_info -Xlinker /Users/Luuk/Library/Developer/Xcode/DerivedData/iDoms-gperwbbtttggqpcvozenraexrhrx/Build/Intermediates/iDoms.build/Debug-iphoneos/iDoms\ Dev.build/Objects-normal/arm64/iDomsPortalDev_dependency_info.dat -o /Users/Luuk/Library/Developer/Xcode/DerivedData/iDoms-gperwbbtttggqpcvozenraexrhrx/Build/Products/Debug-iphoneos/iDomsPortalDev.app/iDomsPortalDev

Undefined symbols for architecture arm64:
"_OBJC_CLASS_$_CBCentralManager", referenced from:
objc-class-ref in EstimoteSDK(ESTBeaconDevice.o)
"_OBJC_CLASS_$_CBUUID", referenced from:
objc-class-ref in EstimoteSDK(ESTBeaconDevice.o)
objc-class-ref in EstimoteSDK(ESTBluetoothServiceAuth.o)
objc-class-ref in EstimoteSDK(ESTBluetoothServiceEstimote.o)
objc-class-ref in EstimoteSDK(ESTBluetoothServiceOta.o)
objc-class-ref in EstimoteSDK(ESTBluetoothServiceSoftware.o)
objc-class-ref in EstimoteSDK(ETBluetoothMath.o)
"_CBAdvertisementDataServiceDataKey", referenced from:
+[ESTDeviceDataHelper parseAdvertisingData:] in EstimoteSDK(ESTDeviceDataHelper.o)
"_CBCentralManagerScanOptionAllowDuplicatesKey", referenced from:
-[ESTBeaconDevice startScanning] in EstimoteSDK(ESTBeaconDevice.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

最佳答案

感谢上面的各种提示,我检查了整个构建文件,并找到了不同的标志。它是“启用模块”,并在我的build设置中设置为“否”。

关于ios - Estimote SDK 的 undefined symbol 链接器失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29163152/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com