As you've already discovered, MSVC (Microsoft Visual C++) is a Windows-based tool and it is not supported directly on Linux. However, there are some alternatives to build Windows applications from a Linux system:
Cross-Compilers: MinGW-w64 is a development environment for Windows applications that can be run on Linux. It provides a set of cross-compiler tools (compiler, linker, etc.) that can generate Windows executables (.exe files) from your source code written in C, C++, or other supported languages.
Windows Subsystem for Linux (WSL): This is a compatibility layer that allows you to run a Linux environment directly on Windows, without the overhead of a virtual machine. With WSL, you can run the Linux version of GCC or Clang to compile your code and then test the executable under Wine or a similar Windows compatibility layer.
Using Docker with a Windows base image: You can create a Docker container using a Windows base image and install your development tools inside that container. This allows you to use your Linux host while compiling inside the Docker container. However, keep in mind that you'll need a Windows host system to run the Windows Docker daemon, which can limit the usefulness of this approach.
Virtual Machines: You can install a Windows OS on a virtual machine (VM) running on your Linux system, then install Visual Studio and other necessary development tools on the VM. This method gives you a full Windows environment to work with, at the expense of additional resource usage.
Remember, each of these methods has its own pros and cons. You would need to decide based on your exact needs and resource availability. In general, MinGW-w64 is one of the simplest ways to build Windows applications from a Linux environment.