Visual Studio cross-compilation to Linux
Before Windows 10 Anniversary Upgrade it was possible to cross-compile to Linux from within VS with Visual C++ for Linux Development extension.
However, you still had to setup a Linux machine (either real one or VM) since this extension supports Remote build & debugging only.
Windows 10 Anniversary Upgrade has introduced Windows Subsystem for Linux, which:
lets developers run Linux environments -- including most command-line tools, utilities, and applications -- directly on Windows, unmodified, without the overhead of a virtual machine
Thanks to this great feature happy owners of Windows 10 can easily setup remote cross-compilation to their localhost
.
You can get the details either in official Microsoft blog post or here.
JeB
Updated on June 04, 2022Comments
-
JeB almost 2 years
Visual Studio 2015 has brought with itself a cross-platform support for native C++ projects. In this context cross-platform means Windows, Android and iOS.
New Visual Studio now officially supports CLang and GCC tool-chains along with its own compiler. However it doesn't support cross-compilation to Linux.
Which, in turn, means that one still have to maintain at least two different projects in different IDEs to get native library binaries for all major operating systems.Is this possible to "cheat" on Visual Studio and enable Linux targeting by modifying parameters of native Android project and/or by modifying NDK installation?
After all, Visual Studio just invokes NDK tools through a command line...-
Michail over 7 yearsCan be what it is a too late. I also busy with same task. found interesting link. theregister.co.uk/2016/03/31/…
-
JeB over 7 yearsLooks promising, but it only supports remote builds. No support for cross-compilation.
-
Michail over 7 yearsI don't found it as a problem. Maybe even advantage: no need to deploy (copy) file to see result and debugging. For me It is more important to have one IDE with one codebase.
-