C++ compiler that runs on windows and generates Linux code C++ compiler that runs on windows and generates Linux code windows windows

C++ compiler that runs on windows and generates Linux code


Absolutely it's possible. You need a compiler that can handle cross-compilations and then specify the target. The key point is to get a compiler that's capable of creating the binary files in a manner required by the target system. g++ would do just that for you.

I worked on a project where we used linux to create embedded arm executables using their C compiler, and then used scp to copy it over for testing.


Yes it's possible, but why bother? There is a risk that you will set it up incorrectly and get a binary which doesn't work correctly.

Plus also, you'll need vmware** installed so you can test the resulting binaries - you are going to run comprehensive tests, aren't you?

Simply set up another VM to do the building (because of course, you need to test that it will work on a machine without the build-tools installed).

** Other virtualisation platforms are available, this is not a commercial.