文件是为归档而构建的,而不是要链接的架构(arm64)

时间:2019-06-24 08:58:31

标签: frameworks

我的问题与他人不同, 我用cmake构建了一个框架,并将该框架嵌入到一个名为demo的演示项目中。 RTMPiOSDemo,在我构建时,链接器声称“文件是为存档而构建的,而不是要链接的体系结构(arm64)”。

我提取了框架目录中的档案“ TP”,并使用lipo -info检查了一个文件的体系结构,它显示了包含我在演示中使用的体系结构。 Architectures in the fat file: ChannelInfo.mm.o are: armv7 armv7s arm64

我尝试在演示项目中修改“仅构建活动架构”设置,但不起作用,以下是我的设置(抱歉,其图片)。 enter image description here

下面是错误消息:     Ld /Users/yanyin/Library/Developer/Xcode/DerivedData/RTMPiOSDemo-cajtuwzumaovolhcplzdlzxpkihn/Build/Products/Debug-iphoneos/RTMPiOSDemo.app/RTMPiOSDemo normal arm64(目标:RTMPiOSDemo)     cd /用户/ yanyin /桌面/项目/newstIOS/RTMPSDKiOS2.0.0.243     导出IPHONEOS_DEPLOYMENT_TARGET = 8.0     /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12。 2.sdk -L / Users / yanyin / Library / Developer / Xcode / DerivedData / RTMPiOSDemo-cajtuwzumaovolhcplzdlzxpkihn / Build / Products / Debug-iphoneos -L / Users / yanyin / Desktop / projects / newstIOS / RTMPSDKiOS2.0.0.243 -L Users / yanyin / Desktop / projects / newstIOS / RTMPSDKiOS2.0.0.243 / RTMPiOSDemo -F / Users / yanyin / Library / Developer / Xcode / DerivedData / RTMPiOSDemo-cajtuwzumaovolhcplzdlzxpkihn / Build / Products / Debug-iphoney -F / User桌面/项目/newstIOS/RTMPSDKiOS2.0.0.243/RTMPiOSDemo -F / Users / yanyin / Desktop / projects / newstIOS / RTMPSDKiOS2.0.0.243 / RTMPiOSDemo -F / Users / yanyin / Desktop / projects / newstIOS / RTMPSDKiOS2.0.0。 243 -filelist /Users/yanyin/Library/Developer/Xcode/DerivedData/RTMPiOSDemo-cajtuwzumaovolhcplzdlzxpkihn/Build/Intermediates.noindex/RTMPiOSDemo.build/Debug-iphoneos/RTMPiOSDemo.build/Objects-正常/arm64/RTMPiOSDemo.LinkFileList -Xlinker -rpath -Xlinker @ executable_path / Frameworks -miphoneos-version-min = 8.0 -dead_strip -Xlinker -object_path_lto -Xlinker / Users / yanyin / Library / Developer / Xcode / DerivedData / RTMPiOSDemozovcahn Build / Intermediates.noindex / RTMPiOSDemo.build / Debug-iphoneos / RTMPiOSDemo.build / Objects-normal / arm64 / RTMPiOSDemo_lto.o -Xlinker -export_dynamic -Xlinker -no_deduplicate -stdlib = libc ++ -fobjc-arc -fobjc-link-runtime- ObjC-框架TP-框架AdSupport-框架资产库-框架安全-框架加速-lresolv -lstdc ++-框架AVFoundation-框架CoreGraphics-框架CoreMedia -lz-框架VideoToolbox -liconv-框架CoreTelephony-框架系统配置-框架TXRTMPSDK_Xlinker Xlinker /用户/ yanyin /库/开发人员/Xcode/DerivedData/RTMPiOSDemo-cajtuwzumaovolhcplzdlzxpkihn/Build/Intermediates.noindex/RTMPiOSDemo.build/Debug-iphoneos/RTMPiOSDemo.build/Objects-normal/ar m64 / RTMPiOSDemo_dependency_info.dat -o /Users/yanyin/Library/Developer/Xcode/DerivedData/RTMPiOSDemo-cajtuwzumaovolhcplzdlzxpkihn/Build/Products/Debug-iphoneos/RTMPiOSDemo.app/RTMPiOSDemo

ld: warning: ignoring file /Users/yanyin/Desktop/projects/newstIOS/RTMPSDKiOS2.0.0.243/RTMPiOSDemo/TP.framework/TP, file was built for archive which is not the architecture being linked (arm64): /Users/yanyin/Desktop/projects/newstIOS/RTMPSDKiOS2.0.0.243/RTMPiOSDemo/TP.framework/TP

Undefined symbols for architecture arm64:

“ _ OBJC_CLASS _ $ _ ChannelInfo”,引用自:       TXP2PLivePlayer.o中的objc-class-ref   从以下位置引用的“ _OBJC_CLASS _ $ _ VPModule”:       TXP2PLivePlayer.o中的objc-class-ref       AppDelegate.o中的objc-class-ref   从以下位置引用的“ _OBJC_CLASS _ $ _ VPVodController”       TXP2PLivePlayer.o中的objc-class-ref ld:找不到体系结构arm64的符号 clang:错误:链接器命令失败,退出代码为1(使用-v查看调用)

0 个答案:

没有答案