[CMake] Cross compiling from linux to windows using wine-based visual studio compilers

Alan W. Irwin irwin at beluga.phys.uvic.ca
Tue Oct 16 00:35:01 EDT 2012


On 2012-10-15 21:02-0700 Daniel Russel wrote:

> I'm trying to get cross compilation of a simple library working to
build a windows library on a linux box using the visual studio
compilers.

I don't get it.  How can visual studio compilers execute properly on Linux?
Don't they need to be run on a Windows platform?

Regardless of the answer to that question you might want to try
building your library with the Windows version of CMake and the visual
studio compilers on the Wine Windows platform on Linux.  Of course,
that is no longer cross-compiling since you are building your Windows
library directly on a Windows platform (Wine).

I have recently had good success with software builds using MinGW/MSYS
and the _Windows version of CMake on Wine.  So if visual studio
compilers don't work on Wine because of some Wine incompatibility with
proprietary Windows, you can always move with a fair degree of
confidence to using MinGW/MSYS (and probably MinGW alone if you have
no need for the MSYS tools) on Wine.

Alan
__________________________
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state
implementation for stellar interiors (freeeos.sf.net); the Time
Ephemerides project (timeephem.sf.net); PLplot scientific plotting
software package (plplot.sf.net); the libLASi project
(unifont.org/lasi); the Loads of Linux Links project (loll.sf.net);
and the Linux Brochure Project (lbproject.sf.net).
__________________________

Linux-powered Science
__________________________


More information about the CMake mailing list