我已将ASDK作为静态库添加到我的项目中。我想对其进行测试,所以我添加了一个ASTextnode。然后,我得到以下错误,但我不知道为什么。任何帮助,将不胜感激
Ld /Users/ap/Library/Developer/Xcode/DerivedData/ASGallery-fzvzhorqnjotpzchjozqlryhsleh/Build/Products/Debug-iphonesimulator/ASGallery.app/ASGallery normal x86_64 cd“ / Users / ap / Documents / XcodeASGalls / _App IPHONEOS_DEPLOYMENT_TARGET = 8.0导出PATH =“ / Applications / Xcode.app / Contents / Developer / Platforms / iPhoneSimulator.platform / Developer / usr / bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/ usr / local / bin:/ usr / bin:/ bin:/ usr / sbin:/ sbin” /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
-arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.1.sdk
-L /用户/ ap /库/开发人员/ Xcode / DerivedData / ASGallery-fzvzhorqnjotpzchjozqlryhsleh /构建/产品/ Debug-iphonesimulator
-F /用户/ ap /库/开发人员/ Xcode / DerivedData / ASGallery-fzvzhorqnjotpzchjozqlryhsleh /构建/产品/ Debug-iphonesimulator
-文件列表/Users/ap/Library/Developer/Xcode/DerivedData/ASGallery-fzvzhorqnjotpzchjozqlryhsleh/Build/Intermediates/ASGallery.build/Debug-iphonesimulator/ASGallery.build/Objects-normal/x86_64/ASGallery.LinkFileList
-Xlinker -rpath -Xlinker @ executable_path / Frameworks -mios-simulator-version-min = 8.0 -Xlinker -objc_abi_version -Xlinker 2 -lc ++ -ObjC -L / Applications / Xcode.app / Contents / Developer / Toolchains / XcodeDefault.xctoolchain / usr / lib / swift / iphonesimulator
-Xlinker -add_ast_path -Xlinker /Users/ap/Library/Developer/Xcode/DerivedData/ASGallery-fzvzhorqnjotpzchjozqlryhsleh/Build/Intermediates/ASGallery.build/Debug-iphonesimulator/ASGallery.build/Objects-normal/x86_ / ap /库/开发人员/Xcode/DerivedData/ASGallery-fzvzhorqnjotpzchjozqlryhsleh/Build/Products/Debug-iphonesimulator/libAsyncDisplayKit.a
-framework照片-framework AssetsLibrary -Xlinker -dependency_info -Xlinker /Users/ap/Library/Developer/Xcode/DerivedData/ASGallery-fzvzhorqnjotpzchjozqlryhsleh/Build/Intermediates/ASGallery.build/Debug-iphonesimulator/ASGallery。 /ASGallery_dependency_info.dat
-o /用户/ ap /库/开发人员/ Xcode / DerivedData / ASGallery-fzvzhorqnjotpzchjozqlryhsleh / Build /产品/Debug-iphonesimulator/ASGallery.app/ASGallery
架构x86_64的未定义符号:“ _llvm_gcda_emit_arcs”,引用自:libAsyncDisplayKit.a(_ASAsyncTransactionGroup.o)中的___llvm_gcov_writeout libAsyncDisplayKit.a(_ASHierarchyChangeSet.o .o)libAsyncDisplayKit.a(ASBackgroundLayoutSpec.o)___llvm_gcov_writeout libAsyncDisplayKit.a(ASFlowLayoutController.o)___llvm_gcov_writeout
libAsyncDisplayKit.a(ASBasicImageDownloader.o)中的___llvm_gcov_writeout ...“ _llvm_gcda_emit_function”,引用自:libAsyncDisplayKit.a(_ASAsyncTransactionGroup.o)的___llvm_gcov_writeout ___llvm_gsync_Kit。 libAsyncDisplayKit.a(ASAsciiArtBoxCreator.o)中的___llvm_gcov_writeout libAsyncDisplayKit.a(ASBackgroundLayoutSpec.o)中的____llvm_gcov_writeout libAsyncDisplayKit.a(ASFlowLayoutController.o)中的___llvm_gcov_writeout
libAsyncDisplayKit.a(ASBasicImageDownloader.o)中的___llvm_gcov_writeout ... lib_sync_Kit中的_llvm_gcda_end_file引用为“ _llvm_gcda_end_file”。 libAsyncDisplayKit.a(ASAsciiArtBoxCreator.o)中的___llvm_gcov_writeout libAsyncDisplayKit.a(ASBackgroundLayoutSpec.o)中的____llvm_gcov_writeout libAsyncDisplayKit.a(ASFlowLayoutController.o)中的___llvm_gcov_writeout
libAsyncDisplayKit.a(ASBasicImageDownloader.o)中的___llvm_gcov_writeout ... lib_sync_Kit中的_llvm_gcda_start_file引用为“ _llvm_gcda_start_file”。 libAsyncDisplayKit.a(ASAsciiArtBoxCreator.o)中的___llvm_gcov_writeout libAsyncDisplayKit.a(ASBackgroundLayoutSpec.o)中的____llvm_gcov_writeout libAsyncDisplayKit.a(ASFlowLayoutController.o)中的___llvm_gcov_writeout
libAsyncDisplayKit.a(ASBasicImageDownloader.o)中的___llvm_gcov_writeout ...“ _llvm_gcda_summary_info”,引用自:libAsyncDisplayKit.a(_ASAsyncTransactionGroup.o)中的___llvm_gcov_writeout ___llvm_gsync_Kit。 libAsyncDisplayKit.a(ASAsciiArtBoxCreator.o)中的___llvm_gcov_writeout libAsyncDisplayKit.a(ASBackgroundLayoutSpec.o)中的____llvm_gcov_writeout libAsyncDisplayKit.a(ASFlowLayoutController.o)中的___llvm_gcov_writeout
libAsyncDisplayKit.a(ASBasicImageDownloader.o)中的___llvm_gcov_writeout ...“ _llvm_gcov_init”,引用自:libAsyncDisplayKit.a中的___ llvm_gcov_init(a)(ASAAsyncDisplayKit.o)中的___llvm_gcov_init64。
libAsyncDisplayKit.a(_ASAsyncTransactionGroup.o)中的___llvm_gcov_init65 libAsyncDisplayKit.a(_ASAsyncTransactionGroup.o)中的____llvm_gcov_init66
libAsyncDisplayKit.a(_ASAsyncTransactionGroup.o)中的___llvm_gcov_init67 libAsyncDisplayKit.a(_ASAsyncTransactionGroup.o)中的____llvm_gcov_init68
libAsyncDisplayKit.a(_ASAsyncTransactionGroup.o)中的___llvm_gcov_init69 ... ld:对于架构x86_64 clang找不到符号:错误:链接器命令失败,退出代码为1(使用-v查看调用)
最佳答案
iPhone模拟器i386和x86_64有一些体系结构。
还有用于iPhone OS的armv7 arm64
。
您的项目是使用架构x86_64构建的。
但是静态库没有这个。
看到了吗? ==> But Undefined symbols for architecture x86_64
您可以使用lipo
在通用(多体系结构,
ture))文件。
lipo $BUILDPATH/$FRAMEWORK.i386.dylib $BUILDPATH/$FRAMEWORK.x86_64.dylib $BUILDPATH/$FRAMEWORK.armv7.dylib $BUILDPATH/$FRAMEWORK.arm64.dylib -create -output $BUILDPATH/$FRAMEWORK
关于ios - AsyncDisplayKit错误(使用ASDK作为静态库),我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/33794413/