15.02.2014 22:53, Peter Maydell wrote:
> Incidentally if you have a simple recipe for setting up a windows
> mingw build environment on Ubuntu (preferably not bleeding-edge
> Ubuntu) then I'm happy to add "compile-test for win32" to my
> pullreq application checklist.

Hm.  I've never did that before, but it appeared quite easy to do.

 apt-get install mingw32

grabbed a few -dev binaries from http://www.gtk.org/download/win32.php,
namely:

 glib
 zlib
 gettext-runtime
 libpng
 pixman

and extracted them into a common directory (say, $mingwhome).

Next, created /usr/local/bin/i586-mingw32msvc-pkg-config with the following:

--- cut ---
#!/bin/sh
prefix=$mingwhome
PKG_CONFIG_LIBDIR=$prefix/lib/pkgconfig
export PKG_CONFIG_LIBDIR
exec pkg-config --define-variable=prefix=$prefix $@
--- cut ---

Now I can build qemu like this:

 ./configure --cross-prefix=i586-mingw32msvc- \
    --extra-cflags=-I$mingwhome/include \
    --extra-ldflags=-I$mingwhome/lib

That's basically all.

This works on debian wheezy.

Similar setup should work for w64 too, except in
this case mingw-w64 is needed, and libs from
http://www.gtk.org/download/win64.php .

Initially I followed http://wiki.qemu.org/Hosts/W32 .

BTW, current debian wheezy catches these constants
in 32bits too.  I mean, when the host is 32bits.

Thanks,

/mjt

Reply via email to