[cfe-users] Compiling for Linux (with Visual Studio and Clang)

John Emmas via cfe-users cfe-users at lists.llvm.org
Sat Aug 8 06:14:27 PDT 2020


On 08/08/2020 13:47, Aaron Ballman wrote:
> Unfortunately, I don't have any experience in this area and I don't
> know anyone who's tried that. It seems like it should be plausible,
> but you may be breaking new ground.
>

Haha - story of my life... ;)

I did a bit more digging and AFAICT Visual Studio does support WSL (like 
Harry said earlier) :-

https://devblogs.microsoft.com/cppblog/c-with-visual-studio-2019-and-windows-subsystem-for-linux-wsl/

It seems to be a way to install Linux so that it can be launched in 
Windows10 - and the Linux distro of your choice will then run in a 
virtual machine - BUT - if I'm reading things correctly, Visual Studio 
can then interact with WSL.  So in effect, you can run Visual Studio (in 
Windows 10) but make it compile apps that'll then run under Linux.

The only minor drawback is that although Visual Studio is supported, 
Visual C++ itself isn't.  So I'd need to install an alternative compiler 
called Clang.  In fact there's even a hint that gcc is also supported.!

I might try it all later.

John


More information about the cfe-users mailing list