When a press RUN of a Swift code on vscode it show me this error:

Viewed 403

And I have downloaded swift from official website and I have checked it path in Environment variables


[Running] swift "x:\1. Other\TEST\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' 
[Done] exited with code=1 in 0.24 seconds 

2 Answers

It's because you are running it on Windows. Try running it on macOS (if possible). I got the same error on Windows, but it compiled perfectly on macOS.

Does it work on MAC? as I understood <stdint.h> and other libraries can't be found. Maybe it's an issue related to windows.Try to start on MAC please so we may understand better

Related