If you use g++ you can build the executable under mingw on windows, so yes.
Another option (somewhat more complex) is to use same code, but different build targets on Windows and Linux. I am using MSVC compiler on windows and g++ under linux. Works fine when you know what you are doing :-)
The easiest approach is using g++ everywhere, I guess.
EDIT: perhaps I misunderstood the question. Build linux executable under windows? Perhaps. But I guess it is much easier to install linux under WMware and build+run it there.