I tried from Ubuntu in Virtualbox and this is the error I now get and it appears to be similar to the error from Cygwin. Configure seems to run fine. Make fails. I'm officially lost.
./configure --cross-prefix=x86_64-w64-mingw32 (...) CC qga/commands-win32.o qga/commands-win32.c: In function ‘qmp_guest_set_user_password’: qga/commands-win32.c:1254:5: warning: passing argument 2 of ‘g_base64_decode’ from incompatible pointer type [enabled by default] rawpasswddata = (char *)g_base64_decode(password, &rawpasswdlen); ^ In file included from /usr/include/glib-2.0/glib.h:35:0, from qga/commands-win32.c:14: /usr/include/glib-2.0/glib/gbase64.h:52:9: note: expected ‘gsize *’ but argument is of type ‘size_t *’ guchar *g_base64_decode (const gchar *text, ^ CC qga/channel-win32.o qga/channel-win32.c: In function ‘ga_channel_create_watch’: qga/channel-win32.c:199:24: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] watch->pollfd.fd = (gintptr) c->rstate.ov.hEvent; ^ qga/channel-win32.c: At top level: qga/channel-win32.c:205:11: error: conflicting types for ‘ga_channel_read’ GIOStatus ga_channel_read(GAChannel *c, char *buf, size_t size, gsize *count) ^ In file included from qga/channel-win32.c:9:0: ./qga/channel.h:30:11: note: previous declaration of ‘ga_channel_read’ was here GIOStatus ga_channel_read(GAChannel *c, gchar *buf, gsize size, gsize *count); ^ qga/channel-win32.c:269:11: error: conflicting types for ‘ga_channel_write_all’ GIOStatus ga_channel_write_all(GAChannel *c, const char *buf, size_t size) ^ In file included from qga/channel-win32.c:9:0: ./qga/channel.h:31:11: note: previous declaration of ‘ga_channel_write_all’ was here GIOStatus ga_channel_write_all(GAChannel *c, const gchar *buf, gsize size); ^ qga/channel-win32.c: In function ‘ga_channel_open’: qga/channel-win32.c:291:19: error: ‘MAXPATHLEN’ undeclared (first use in this function) gchar newpath[MAXPATHLEN] = {0}; ^ qga/channel-win32.c:291:19: note: each undeclared identifier is reported only once for each function it appears in qga/channel-win32.c:291:11: warning: unused variable ‘newpath’ [-Wunused-variable] gchar newpath[MAXPATHLEN] = {0}; ^ make: *** [qga/channel-win32.o] Error 1 On Wed, Sep 16, 2015 at 1:51 PM, Mike Ladouceur <mike.ladouc...@live.com> wrote: > Thanks for the reply. I will try to cross-compile via cygwin seeing as > I've had no luck installing and configuring mingw64. > > On Tue, Sep 15, 2015 at 4:44 PM, Eric Blake <ebl...@redhat.com> wrote: > >> On 09/15/2015 02:10 PM, Stefan Weil wrote: >> >> >> >> CC qga/commands-win32.o >> >>> qga/commands-win32.c: In function ‘qmp_guest_set_user_password’: >> >>> qga/commands-win32.c:1254:55: warning: passing argument 2 of >> >>> ‘g_base64_decode’ from incompatible pointer type >> >>> rawpasswddata = (char *)g_base64_decode(password, &rawpasswdlen); >> >>> ^ >> >> Ugh. Compiling for cygwin should favor POSIX interfaces, not >> commands-win32. The build is failing because it isn't even correctly >> deciding which files it should be compiling. >> >> >> > compiling with cygwin is unsupported. I suggest using MinGW-w64 >> > (which also works for cross compilations under Linux). >> >> Remember, cygwin is itself an emulation layer - you are emulating POSIX >> interfaces on top of Windows; which, while making the environment easier >> to port to, also makes the environment slower. qemu targets mingw and >> not cygwin because qemu is an emulator and already slow enough, without >> needing another layer of emulation thrown in the mix. >> >> That said, if you want to port qemu to cygwin and supply patches, I'm >> more than willing to help review them. It's just that right now, it's >> not my personal itch to write such patches, and that the qemu community >> currently favors mingw rather than cygwin. >> >> Also, cygwin comes with cross-compilers, so you can still use your >> cygwin setup to compile qemu for mingw (although doing the cross-compile >> on a true Linux box will be faster). >> >> -- >> Eric Blake eblake redhat com +1-919-301-3266 >> Libvirt virtualization library http://libvirt.org >> >> >