Hi there... back in 2019 I read somewhere that the clang devs and Microsoft were collaborating to make Visual Studio compatible with clang. IIRC the goal was to be able to use Visual Studio to build programs for both Windows and Linux. I tested Visual Studio with clang (on Windows) and I was hugely surprised at how well they work together!!
So what's the situation if I want to compile some C++ code for Linux? I realise that Windows-specific features won't be supported (e.g. MFC) but what about cross-platform code? Is there a Linux version of Visual Studio available now? Or does it work by cross-compiling from VS (in Windows) somehow? Hope that makes sense....
I don't know anyone that is cross compiling from windows to linux using visual studio and clang right now. It doesn't mean it can't work, just that it's not easy to point you at an example unfortunately.
This post was updated on December 11, 2020 Visual Studio 2019 version 16.1 added native support for using C++ with the Windows Subsystem for Linux (WSL). WSL lets you run a lightweight Linux environment directly on Windows, including most...
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 don't know anyone that is cross compiling from windows to linux using
visual studio and clang right now. It doesn't mean it can't work, just
that it's not easy to point you at an example unfortunately.
>
> +Robinson, Paul as someone that might know others that are.
> +Aaron Ballman also.
>
> You can also try asking on either irc or discord and see if anyone there
can help.
The Sony toolkit for PS4 uses Visual Studio to drive clang, a proprietary
linker, and proprietary debugger for cross-building and debugging. Also
some other tools IIRC. We use a VS plugin to make this all work smoothly,
although I don't know any details about it. This is to say it's all
possible, although like everyone else I'm not aware of any worked example
targeting Linux.
--paulr
Install Windows Subsystem for Linux with the command, wsl --install. Use a Bash terminal on your Windows machine run by your preferred Linux distribution - Ubuntu, Debian, SUSE, Kali, Fedora, Pengwin, Alpine, and more are available.
Basically... it needs me to use Windows PowerShell to enable something called the 'Virtual Machine Platform' (that bit worked okay). But then I need to enable Virtualisation which can only be done from within a machine's BIOS. Unfortunately, although I'm running Windows 10, I'm actually running it on Mac hardware (i.e. via dual-booting). And Macs don't allow access to the BIOS - not even when running Windows...
hello every one. I have a question about slicer c++ development. my develop environment is linux os, and use visual studio code to code. how can i perform single step debug in visual studio code and have normal auto complete. how to write task,json, launch.json, cpp_propetries.json. thanks to read!
d3342ee215