gpt4 book ai didi

iOS -weak_library 和 -bitcode_bundle(Xcode 设置 ENABLE_BITCODE=YES)不能一起使用

转载 作者:行者123 更新时间:2023-11-28 14:23:52 25 4
gpt4 key购买 nike

我想为我的项目使用Tesseract。我创建了一个新项目,将 Tesseract 添加到我的 pod 文件中。 pod 安装正确,我的项目在模拟器设备上完美构建。但是在真机上出现了以下错误。不知道发生了什么ld: -weak_library 和 -bitcode_bundle (Xcode setting ENABLE_BITCODE=YES) 不能一起使用clang:错误:链接器命令失败,退出代码为 1(使用 -v 查看调用)

最佳答案

问题原因: 在安装 cocoapod 依赖项时,使用 ENABLED_BITCODE = YES 编译,因此它会覆盖此设置,从而产生问题。为了解决这个问题,我们必须在我们的 cocoapod 上添加这些行,这样 ENABLED_BITCODEsetting 在 cocoapod 依赖安装期间不会被覆盖

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

关于iOS -weak_library 和 -bitcode_bundle(Xcode 设置 ENABLE_BITCODE=YES)不能一起使用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51758808/

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