【问题标题】:swift-corelibs-dev build-script with --foundation is not working带有 --foundation 的 swift-corelibs-dev 构建脚本不起作用
【发布时间】:2017-01-26 08:50:24
【问题描述】:

我使用以下选项在 Ubuntu 上成功(没有错误)构建了 swift:

./utils/build-script --release --foundation --verbose-build --build-stdlib-deployment-targets all -l -b -p --skip-test-linux --build-swift-static-stdlib --build-swift-static-sdk-overlay --xctest -c

我的目标是在静态编译的二进制文件中使用 Foundation。

如前所述,构建过程中一切正常,但执行如下所示的简单脚本失败。

import Foundation

print("Hello Swift.")

我收到以下错误:

/bin/swiftc /home/hello.swift -o /home/hello             
/home/hello.swift:1:8: error: no such module 'Foundation'

你知道如何在 linux 上使用 --foundation 吗?

【问题讨论】:

    标签: linux swift foundation


    【解决方案1】:

    目前非 mac 环境不支持基础框架 请参考这个 is it possible to build swift code using the foundation framework and target

    【讨论】:

    猜你喜欢
    • 2017-10-13
    • 2015-08-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2023-03-04
    • 1970-01-01
    相关资源
    最近更新 更多