Answer the question
In order to leave comments, you need to log in
How to compile under Linux from under Windows?
Let's say I wrote a program in C ++ on Windows, and I need to compile under Linux. Thought I could install the Visual C++ for Linux Development extension on my VS 2012, but it only seems to be supported on later versions.
I now need to somehow compile this program under Linux. How to do this without using a virtual machine? I would like to find some solution for VS 2012 or via Qt.
Answer the question
In order to leave comments, you need to log in
If you have a console application and win10, then you can put Linux Subsystem for Windows inside, put gcc and toolchains and compile there - you will get a native Linux executable file.
Perhaps you can also build graphical (window) applications, but you won't be able to run them (because Linux Subsystem for Windows does not support graphics).
For graphical applications, you can install msys2 / mingw and a cross compiler (gcc) and build there.
But in fact, if you need to build graphical applications, then the easiest way is to install a virtual machine with Linux.
You can try to find the g ++ assembly under Cygwin and compile it, but I'm not sure.
Actually, on nix's for Windows, I compile with native compilers running under wine
And Cygwin is wine the other way around
. Another option is to compile clang, yes there will be a layer in the form of llvm, but it works cross-platform
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question