Cross-compilation of glib2 on win32/win64: glibconfig.h



Hi all,

I'm cross-compiling the GTK+ toolchain with mingw-w64 to win32
and win64 platforms. Cairo fails in the cairo-gobject component
in win64 mode and I strongly *suspect* this is due to a wrong
glibconfig.h (infact it is the same as the one installed for
win32, and I think this cannot be possible). This is the trimmed
down failing code:

#include <glib-object.h>

int main()
{
   static volatile gsize value = 0;
   g_once_init_enter((volatile void *) &value);
   return 0;
}

It fails at compilation stage with:

test.c: In function 'main':
test.c:6:1: error: size of array '_GStaticAssertCompileTimeAssertion_0' is negative
test.c:6:4: error: invalid use of void expression
test.c:6:1: error: size of array '_GStaticAssertCompileTimeAssertion_1' is negative
test.c:6:4: warning: dereferencing 'void *' pointer [enabled by default]
test.c:6:4: error: invalid use of void expression

Now the questions: how do you deal with glibconfig.h in cross
compilation? Is there a sample glibconfig.h suitable for win64 or
the only idea is an abomination?

Ciao.
-- 
Nicola



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]