ios - clang : error: linker command failed with exit code 1 iOS9

标签 ios objective-c xcode runtime-error

运行代码时出现以下错误。我最近将我的 xcode 更新为 xcode 7。

  Ld /Users/anurajennai/Library/Developer/Xcode/DerivedData/cdm_player_ios-cvwkkaawlnzyccamzriqmgoezgqi/Build/Products/Debug-iphoneos/cdm_reference_player.app/cdm_reference_player normal armv7
        cd /Users/anurajennai/Desktop/myApps/unziped/cdm_player_xcode_template
        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/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
        /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -arch armv7 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.0.sdk -L/Users/anurajennai/Library/Developer/Xcode/DerivedData/cdm_player_ios-cvwkkaawlnzyccamzriqmgoezgqi/Build/Products/Debug-iphoneos -L/Users/anurajennai/Library/Developer/Xcode/DerivedData/cdm_player_ios-cvwkkaawlnzyccamzriqmgoezgqi/Build/Products/Debug -L/Users/anurajennai/Desktop/myApps/unziped/cdm_player_xcode_template/oemcrypto_tfit_ios/dev -F/Users/anurajennai/Library/Developer/Xcode/DerivedData/cdm_player_ios-cvwkkaawlnzyccamzriqmgoezgqi/Build/Products/Debug-iphoneos -F/Users/anurajennai/Desktop/myApps/unziped/cdm_player_xcode_template/oemcrypto_tfit_ios/dev -F/Users/anurajennai/Desktop/myApps/unziped/cdm_player_xcode_template/oemcrypto_tfit_ios_dylib/dev -F/Users/anurajennai/Desktop/myApps/unziped/cdm_player_xcode_template/oemcrypto_tfit_ios_dylib/release -filelist /Users/anurajennai/Library/Developer/Xcode/DerivedData/cdm_player_ios-cvwkkaawlnzyccamzriqmgoezgqi/Build/Intermediates/cdm_player_ios.build/Debug-iphoneos/cdm_reference_player.build/Objects-normal/armv7/cdm_reference_player.LinkFileList -Xlinker -rpath -Xlinker @executable_path/Frameworks -miphoneos-version-min=7.0 -fembed-bitcode-marker -fobjc-arc -fobjc-link-runtime -framework oemcrypto_tfit2-eit_release_dylib /Users/anurajennai/Library/Developer/Xcode/DerivedData/cdm_player_ios-cvwkkaawlnzyccamzriqmgoezgqi/Build/Products/Debug-iphoneos/libCocoaAsyncSocket.a /Users/anurajennai/Library/Developer/Xcode/DerivedData/cdm_player_ios-cvwkkaawlnzyccamzriqmgoezgqi/Build/Products/Debug-iphoneos/libCocoaHTTPServer.a /Users/anurajennai/Library/Developer/Xcode/DerivedData/cdm_player_ios-cvwkkaawlnzyccamzriqmgoezgqi/Build/Products/Debug-iphoneos/libTBXML-iOS.a -framework AVFoundation -framework CFNetwork -framework CoreFoundation -framework CoreGraphics -framework CoreMedia -framework Foundation -framework Security -framework UIKit -framework oemcrypto_tfit2-eit_dev_dylib -framework oemcrypto_tfit2_dev_dylib_sim -Xlinker -dependency_info -Xlinker /Users/anurajennai/Library/Developer/Xcode/DerivedData/cdm_player_ios-cvwkkaawlnzyccamzriqmgoezgqi/Build/Intermediates/cdm_player_ios.build/Debug-iphoneos/cdm_reference_player.build/Objects-normal/armv7/cdm_reference_player_dependency_info.dat -o /Users/anurajennai/Library/Developer/Xcode/DerivedData/cdm_player_ios-cvwkkaawlnzyccamzriqmgoezgqi/Build/Products/Debug-iphoneos/cdm_reference_player.app/cdm_reference_player

    ld: '/Users/anurajennai/Desktop/myApps/unziped/cdm_player_xcode_template/oemcrypto_tfit_ios_dylib/release/oemcrypto_tfit2-eit_release_dylib.framework/oemcrypto_tfit2-eit_release_dylib' does not contain bitcode. You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE), obtain an updated library from the vendor, or disable bitcode for this target. for architecture armv7
    clang: error: linker command failed with exit code 1 (use -v to see invocation)

编辑 enter image description here

看这张图片。在错误日志中,它说

oemcrypto_tfit2-eit_release_dylib' does not contain bitcode

我必须将哪一项设为“否”,哪一项设为"is"?

修改BITCODE设置后(如果debug和release都是NO,同样报错) enter image description here

ld: warning: ignoring file /Users/anurajennai/Desktop/myApps/unziped/cdm_player_xcode_template/oemcrypto_tfit_ios_dylib/release/oemcrypto_tfit2-eit_release_dylib.framework/oemcrypto_tfit2-eit_release_dylib, missing required architecture i386 in file /Users/anurajennai/Desktop/myApps/unziped/cdm_player_xcode_template/oemcrypto_tfit_ios_dylib/release/oemcrypto_tfit2-eit_release_dylib.framework/oemcrypto_tfit2-eit_release_dylib (2 slices)
ld: warning: ignoring file /Users/anurajennai/Desktop/myApps/unziped/cdm_player_xcode_template/oemcrypto_tfit_ios/dev/oemcrypto_tfit2-eit_dev_dylib.framework/oemcrypto_tfit2-eit_dev_dylib, missing required architecture i386 in file /Users/anurajennai/Desktop/myApps/unziped/cdm_player_xcode_template/oemcrypto_tfit_ios/dev/oemcrypto_tfit2-eit_dev_dylib.framework/oemcrypto_tfit2-eit_dev_dylib (2 slices)
ld: embedded dylibs/frameworks are only supported on iOS 8.0 and later (@rpath/oemcrypto_tfit2_dev_dylib_sim.framework/oemcrypto_tfit2_dev_dylib_sim) for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

最佳答案

oemcrypto_tfit2-eit_release_dylib.framework/oemcrypto_tfit2-eit_release_dylib

不包含bitcode,要么要求这个库的供应商提供bitcode,要么为这个项目禁用bitcode

请再次阅读错误信息:

'oemcrypto_tfit2-eit_release_dylib.framework/oemcrypto_tfit2-eit_release_dylib' does not contain bitcode. You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE), obtain an updated library from the vendor, or disable bitcode for this target. for architecture armv7

关于ios - clang : error: linker command failed with exit code 1 iOS9,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32708888/

相关文章:

ios - 静态库抛出链接器错误 : "No such file or directory"

iphone - 核心数据更新模型与应用程序更新?

ios - Google登录权限列表在授权之间进行更改

objective-c - XCode 4 无法编译非常大的数组,以及有关 NSArray/NSString 开销的问题

objective-c - Firebase FCM 实例 ID 为零(在真实设备上运行快速启动应用程序)

html - hpple XpathQuery 的想法?

ios - UIButton 在 vi​​ewDidLoad 中为 null

android - 可以在 iOS 设备上强制预加载 HTML5 视频吗?

ios - 在 Multipeer 连接中不显示警报消息的情况下连接浏览器和广告商

swift - 如何在 Xcode 中添加可由 Swift 包管理器运行的可执行文件?