atirit
(Aydin Tiritoglu)
March 18, 2020, 5:50am
1
I've tried installing Swift using @compnerd 's nightly builds and it installed fine, but when trying to build the examples in https://github.com/compnerd/swift-build-examples/ , I receive the following:
<unknown>:0: error: unable to load standard library for target 'x86_64-unknown-windows-msvc'
I tried using the prebuilt installer provided, and I get the same error.
I haven't managed to find anything elsewhere on this, so I posted here.
compnerd
(Saleem Abdulrasool)
March 18, 2020, 6:04pm
2
You should have a look at the documentation at https://github.com/compnerd/swift-build/blob/master/docs/Windows.md for details on the flags that are required (-sdk ...
).
The -sdk
flags tell the compiler where the platform SDK. The setup on the Windows builds are different so that it is easy to use the toolchain to cross-compile for Android, Windows, and Linux using that toolchain.
atirit
(Aydin Tiritoglu)
March 20, 2020, 5:37am
3
So it turns out doing this at one in the morning isn't the best idea.
I forgot to set the variables listed in the documentation. I didn't execute these lines:
SET INSTALLATION_DIR=C:
SET SDK=%INSTALLATION_DIR%\Library\Developer\Platforms\Windows.platform\Developer\SDKs\Windows.sdk
SET OS=windows
I ran those before the cmake
command and now it works.
Thanks!
compnerd
(Saleem Abdulrasool)
March 20, 2020, 6:24pm
4
Awesome! Glad to hear that you got it working!