To run a Linux program on Windows, you have these options:
Run the program as-is on the Windows Subsystem for Linux (WSL). In WSL your program executes directly on the machine hardware, not in a virtual machine. WSL also enables direct filesystem calls between Windows and Linux systems, removing the need for SSL transport. WSL is designed as a command-line environment and is not recommended for graphics-intensive applications. For more information, see Windows Subsystem for Linux Documentation.
Run the program as-is in a Linux virtual machine or Docker container, either on your local machine or on Azure. For more information, see Virtual Machines and Docker on Azure.
Compile the program using gcc or clang in the MinGW or MinGW-w64 environments, which provide a translation layer from Linux to Windows system calls.
Compile and run the program using gcc or clang in the Cygwin environment, which provides a more complete Linux environment on Windows compared to MinGW or MinGW-w64.
Manually port your code from Linux and compile for Windows using Microsoft C++ (MSVC). This involves refactoring platform-independent code into separate libraries, and then re-writing the Linux-specific code to use Windows-specific code (for example, Win32 or DirectX APIs). For applications that require high performance graphics, this is probably the best option.
In this module, you learn how to use the Windows Subsystem for Linux (WSL) with Visual Studio Code (VS Code). We explore the installation process and the basics of using WSL. Additionally, we install and utilize the Visual Studio Code WSL extension. Finally, we demonstrate how to debug and run Python code in VS Code within our WSL environment.