Hello, I am trying to install swift on a Windows 10 machine, following the installation instructions on swift.org.
(Note that I already have Visual Studio 2019 installed. I am using it to develop an application in C#) that I cannot afford to destroy by reinstalling another version of Visual Studio)
I have downloaded and ran 5.6.2 release file:"swift-5.6.2-RELEASE-windows10.exe"; no problem.
Then I followed the "Installation instructions"; the first two commands work fine:
winget install Git.Git
winget install Python.Python.3 --version 3.10.2150.0
However, when I type in third command:
curl -sOL https://aka.ms/vs/16/release/vs_community.exe
I get an error message:
=> Invoke-WebRequest : A parameter cannot be found that matches parameter name 'sOL'.
If I try to copy&paste and run the fourth command:
start /w vs_community.exe .....
=> I get LOTS of error messages.
Note that following command works fine:
=> compnerd.org Swift version 5.6.1 (swift-5.6.1-RELEASE)
However, if I try to run swift to get to the REPL loop:
=> nothing happens (swift quits instantly)
If I follow the instructions to create a package:
swift package init
I get error message:
=> warning: Failed creating default cache location, Error Domain=NSCocoaErrorDomain Code=256 "(null)"
If I insist and try command "swift run Hello", I get:
warning: Failed creating default cache location, Error Domain=NSCocoaErrorDomain Code=256 "(null)"
'hello': error: invalidManifestFormat(":1:10: note: in file included from :1:\r\r\n#include "AssertionReporting.h"\r\r\n ^\r\r\nC:\Library\Developer\Platforms\Windows.platform\Developer\SDKs\Windows.sdk\usr\lib\swift\shims/AssertionReporting.h:16:10: note: in file included from C:\Library\Developer\Platforms\Windows.platform\Developer\SDKs\Windows.sdk\usr\lib\swift\shims/AssertionReporting.h:16:\r\r\n#include "SwiftStdint.h"\r\r\n ^\r\r\nC:\Library\Developer\Platforms\Windows.platform\Developer\SDKs\Windows.sdk\usr\lib\swift\shims/SwiftStdint.h:28:10: error: 'stdint.h' file not found\r\r\n#include <stdint.h>\r\r\n ^\r\r\n:0: error: could not build C module 'SwiftShims'", diagnosticFile: nil)
Is there any reliable list of instruction that I could follow to have a proper swift compiler on Windows?
Thanks in advance