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.
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 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.
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:
I ran those before the
cmake command and now it works.
Awesome! Glad to hear that you got it working!