Swift on Windows

Hi everyone :wave:

I installed the Swift toolchain for Windows as described here Swift.org - Download Swift
Also have Visual Studio installed.

I get an error if I try to compile a simple hello world file

>>> swift test.swift
<module-includes>:1:10: note: in file included from <module-includes>:1:
#include "AssertionReporting.h"
         ^
C:\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:
#include "SwiftStdint.h"
         ^
C:\Library\Developer\Platforms\Windows.platform\Developer\SDKs\Windows.sdk\usr\lib\swift\shims/SwiftStdint.h:28:10: error: 'stdint.h' file not found
#include <stdint.h>
         ^
<unknown>:0: error: could not build C module 'SwiftShims'

Any ideas what may have gone wrong ? I am on Windows 10
Thank you ! :slightly_smiling_face:

I'm having the same issue on:

compnerd.org Swift version 5.4.2 (swift-5.4.2-RELEASE)
Target: x86_64-unknown-windows-msvc
1 Like

From the error, you haven't completed the installation steps. You must install the support files. See Swift.org - Getting Started for detailed instructions.

1 Like

i complete the installation steps and still get the same error

Terms of Service

Privacy Policy

Cookie Policy