gpt4 book ai didi

ios - IBM MobileFirst 7.0 - libstdc++.6.dylib 上的 Xcode 10.1/iOS 12 问题

转载 作者:塔克拉玛干 更新时间:2023-11-02 10:20:41 28 4
gpt4 key购买 nike

我们在移动应用程序开发中使用 MFP 7.0。在 Xcode 9 上,我们没有任何问题,我们所有的应用程序都可以顺利运行。当 Xcode 10 和 iOS 12 发布时,我们升级了 MacBook,但在编译过程中遇到了问题。我们添加了论坛推荐的库 libstdc++.6.dylib。当我们在模拟器上运行时它工作正常,但如果我们尝试在真实设备 (iPhone/iPad) 中进行测试,我们会收到错误消息“../native/Frameworks/libstdc++.6.dylib,缺少必需的架构 arm64 ".

当我运行针对我的 iphone 设备的应用程序时,这是我的 xcode 中的实际警告/错误日志:

ld: warning: ignoring file /Users/jm/Documents/App/native/Frameworks/libstdc++.6.dylib, missing required architecture arm64 in file /Users/jm/Documents/App/native/Frameworks/libstdc++.6.dylib (2 slices) Undefined symbols for architecture arm64: "std::basic_ostringstream, std::allocator >::basic_ostringstream(std::_Ios_Openmode)", referenced from: +[NSNumber(UCUtils) doubleToString:] in libWorklightStaticLibProject.a(NSNumber-UCUtils.o) "std::ostream::operator<<(double)", referenced from: +[NSNumber(UCUtils) doubleToString:] in libWorklightStaticLibProject.a(NSNumber-UCUtils.o) "std::string::c_str() const", referenced from: +[NSNumber(UCUtils) doubleToString:] in libWorklightStaticLibProject.a(NSNumber-UCUtils.o) "std::basic_string, std::allocator >::~basic_string()", referenced from: +[NSNumber(UCUtils) doubleToString:] in libWorklightStaticLibProject.a(NSNumber-UCUtils.o) "std::basic_ostringstream, std::allocator >::str() const", referenced from: +[NSNumber(UCUtils) doubleToString:] in libWorklightStaticLibProject.a(NSNumber-UCUtils.o) "std::basic_ostringstream, std::allocator >::~basic_ostringstream()", referenced from: +[NSNumber(UCUtils) doubleToString:] in libWorklightStaticLibProject.a(NSNumber-UCUtils.o) ld: symbol(s) not found for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

:-1: ignoring file /Users/jm/Documents/App/native/Frameworks/libstdc++.6.dylib, missing required architecture arm64 in file /Users/jm/Documents/App/native/Frameworks/libstdc++.6.dylib (2 slices)

:-1: symbol(s) not found for architecture arm64

:-1: linker command failed with exit code 1 (use -v to see invocation)

最佳答案

我尝试在 MFP v6.2 上进行操作,它在设备上运行良好。你也可以试试。您能否从复制 stdlibc++ 库的位置提供问题的更多详细信息。

  1. 从你的 Xcode 9 机器上

复制文件:(libstdc++.6.0.9.tbd)和(libstdc++.6.tbd)/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/lib和/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/lib

  1. 粘贴到 Xcode 10 机器上的以下路径

将文件:(libstdc++.6.0.9.tbd) 和 (libstdc++.6.tbd) 复制到:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/lib/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/lib

(请注意区分“iPhoneOS”和“iPhoneSimulator”)

  1. 将复制的库(libstdc++.6.0.9.tbd)和(libstdc++.6.tbd)添加到Xcode项目的“Build Phase-> Link libraries”路径。

  2. 清理 xcode 并重建它。

  3. 在 iOS 12 设备上执行

注意:对于模拟器问题/usr/lib/libstdc++.6.dylib: mach-o, but not built for iOS simulator, can try copy the original file: libstdc++.6.0.9 .dylib 和 libstdc++.6.dylib 和 libstdc++.dylib 到:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/资源/RuntimeRoot/usr/lib

但有时连做都不行,建议在iOS 11模拟器上运行

关于ios - IBM MobileFirst 7.0 - libstdc++.6.dylib 上的 Xcode 10.1/iOS 12 问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53440249/

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