Xcode 7 ENABLE_BITCODE问题

时间:2016-08-01 12:57:48

标签: xcode7 tesseract xcode7.3

我不确定如何解决这个问题:

ld:-weak_library和-bitcode_bundle(Xcode设置ENABLE_BITCODE = YES)不能一起使用 clang:错误:链接器命令失败,退出代码为1(使用-v查看调用)

我在目标中将ENABLE_BITCODE切换为NO,但它对此问题没有任何作用。

我在项目设置中尝试了ENABLE_BITCODE = NO,但同样的问题也是如此。

1 个答案:

答案 0 :(得分:0)

当我使用可可豆荚时,我已使用此设置更新了我的pod文件,将enable bitcode设置为NO状态:

source 'https://github.com/CocoaPods/Specs.git'

platform :ios, '9.0'
use_frameworks!
inhibit_all_warnings!

target 'MyProjectTargetName' do

pod 'YmsCoreBluetooth', '~> 1.10'
pod 'CrittercismSDK', '5.4.0'
pod 'XCGLogger', '~> 3.3'
pod 'TesseractOCRiOS', '~> 4.0'

end

post_install do |installer|

  installer.pods_project.targets.each do |target|
    installer.pods_project.build_configurations.each do |config|
      config.build_settings['ENABLE_BITCODE'] = 'NO'
      config.build_settings['CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES'] = 'YES' 
    end

    target.build_configurations.each do |config|
      config.build_settings['ENABLE_BITCODE'] = 'NO'
      config.build_settings['CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES'] = 'YES'
    end
  end
end