【问题标题】:Command line Swift build - This copy of libswiftCore.dylib requires an OS version prior to 10.14.4命令行 Swift 构建 - libswiftCore.dylib 的此副本需要 10.14.4 之前的操作系统版本
【发布时间】:2019-10-03 21:53:29
【问题描述】:

我正在使用命令行构建一个 Swift 项目。 macOS 版本是 10.14.5,Xcode 版本是 10.2.1

当尝试运行生成的可执行文件时,我得到: “此 libswiftCore.dylib 副本需要 10.14.4 之前的操作系统版本。”

在我得到的可执行文件上运行“otool -L”: “…… @rpath/libswiftCore.dylib(兼容版本 1.0.0,当前版本 1001.0.82) ……”

运行“swift --version”我得到: “苹果 Swift 版本 5.0.1 (swiftlang-1001.0.82.4 clang-1001.0.46.5) 目标:x86_64-apple-darwin18.6.0"

运行“xcrun swift --version”我得到: “苹果 Swift 版本 5.0.1 (swiftlang-1001.0.82.4 clang-1001.0.46.5) 目标:x86_64-apple-darwin18.6.0"

有什么想法可以运行生成的可执行文件吗?

【问题讨论】:

    标签: ios swift xcode xcrun


    【解决方案1】:

    我遇到了同样的问题。 目前可以通过指定目标来修复:

    swift build -Xswiftc "-target" -Xswiftc "x86_64-apple-macosx10.14"
    

    【讨论】:

      猜你喜欢
      • 2019-09-02
      • 2019-08-17
      • 1970-01-01
      • 1970-01-01
      • 2012-02-05
      • 1970-01-01
      • 2014-12-26
      • 2014-08-21
      • 1970-01-01
      相关资源
      最近更新 更多