Swift - Installation and Getting Started on Windows
Описание
How to install Swift for Windows and compile a simple Swift program.
Commands used in the video:
- In a x64 Native Tools for VS2019 Command Prompt (Admin)
copy %SDKROOT%\usr\share\ucrt.modulemap "%UniversalCRTSdkDir%\Include\%UCRTVersion%\ucrt\module.modulemap"
copy %SDKROOT%\usr\share\visualc.modulemap "%VCToolsInstallDir%\include\module.modulemap"
copy %SDKROOT%\usr\share\visualc.apinotes "%VCToolsInstallDir%\include\visualc.apinotes"
copy %SDKROOT%\usr\share\winsdk.modulemap "%UniversalCRTSdkDir%\Include\%UCRTVersion%\um\module.modulemap"
- Environments variables for the Swift compiler:
set SWIFTFLAGS=-sdk %SDKROOT% -resource-dir %SDKROOT%\usr\lib\swift -I %SDKROOT%\usr\lib\swift -L %SDKROOT%\usr\lib\swift\windows
- Building a Swift program:
swiftc %SWIFTFLAGS% -emit-executable -o Hello.exe Hello.swift
Рекомендуемые видео



















