Is there a msvc support on linux. If not what are the alternative to build windows application from Linux operating system

Ajay Sureka 0 Reputation points
2023-07-26T15:56:06.86+00:00

I installed on my local windows system it builds the project succesfully. But now i want to enable building the same functionality from my linux machine which is running Ubuntu. When i tried installing msvc on ubuntu it would not install. I suppose msvc is for windows OS but can you provide guidance on how I can do it on linux system.

Skype for Business Linux
Skype for Business Linux
Skype for Business: A Microsoft communications service that provides communications capabilities across presence, instant messaging, audio/video calling, and an online meeting experience that includes audio, video, and web conferencing.Linux: A family of open-source Unix-like operating systems.
456 questions
Microsoft Intune Linux
Microsoft Intune Linux
Microsoft Intune: A Microsoft cloud-based management solution that offers mobile device management, mobile application management, and PC management capabilities.Linux: A family of open-source Unix-like operating systems.
44 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Will Chen 145 Reputation points
    2023-07-27T03:47:15.8566667+00:00

    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.

    Thanks!

    0 comments No comments