[Mono-dev] [PATCH] Cross-compiling mono for Windows on Linux, using Mingw

Marek Habersack grendel at twistedcode.net
Thu Jul 31 09:08:01 EDT 2008


Hello everybody,

	Attached is a patch which makes it possible to cross-compile Mono for
Windows on Linux. In order to do it, after applying the patch, you need to install
the mingw cross compiler for your system. OpenSUSE 10.3 and 11 users can do it from
the repository at:

http://download.opensuse.org/repositories/CrossToolchain:/mingw/openSUSE_10.3/

	The attached patch contains a script which builds the mono runtime for
Windows (it doesn't build the class libraries) and, by default, it assumes that the
cross compiler is installed in '/opt/cross' and the mingw target is '-mingw32msvc'.
You can set the former with the first parameter to the script and the latter with
the second parameter. The compiled mono will be put in `pwd`/mono-win32.

	In order to build and link you will also need the following package (sorry,
it's only an RPM) with Mono build time dependencies packaged to work with the cross
compiler from the above OpenSUSE repository:

http://grendel.thanes.org/mono/cross-mono-build-dependencies-1.0.0-1.noarch.rpm

	Note that despite having successfully compiled mono I haven't had time to
actually _run_ it on Windows yet :) - ymmv, then :)

	Please review the patch and let me know if it's ok to commit it.

marek
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mingw_build.diff
Type: text/x-patch
Size: 4431 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20080731/99ddc270/attachment.bin 


More information about the Mono-devel-list mailing list