【发布时间】: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