gpt4 book ai didi

ios - Xcode 7 中的脂肪库

转载 作者:行者123 更新时间:2023-11-29 12:13:13 25 4
gpt4 key购买 nike

我在使用 Xcode 工具链为 Boost 构建胖库时遇到问题。在脚本中进行一些修复后,构建本身可以正常工作,但是当我在项目中使用它时,出现链接器错误:

ld: in boost.framework/boost(atomic_lockpool.o), building for iOS simulator, but linking in object file built for OSX, for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

我还找到了same problem在 Apple Developer Forums 但没有任何解决方案只是人们报告同样的问题。

lipo -info 输出:

Architectures in the fat file: boost.framework/boost are: armv7 armv7s i386 x86_64 arm64

最佳答案

现在它需要附加标志 cxxflags="-miphoneos-version-min=7.0" 用于 bjam

下面是 bjam 调用现在的样子(对于模拟器):

bjam -j$(CORES) --build-dir=$(IPHONESIM_BUILD_DIR) --stagedir=$(IPHONESIM_STAGE_DIR) --toolset=darwin-$(IPHONE_SDKVERSION)~iphonesim cxxflags="-miphoneos-version-min=7.0" architecture=x86 target-os=iphone macosx-version=iphonesim-$(IPHONE_SDKVERSION) link=static

关于ios - Xcode 7 中的脂肪库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32725158/

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