On Wed, Jan 21, 2009 at 4:11 PM, Richard W.M. Jones <[email protected]> wrote:
> On Wed, Jan 21, 2009 at 03:57:45PM +0200, Ryan McDougall wrote:
>> dbus-binding-tool-glib.o: In function `dbus_binding_tool_output_glib_server':
>> /home/ryanm/Code/dbus-glib/dbus/dbus-binding-tool-glib.c:802:
>> undefined reference to `_g_file_open_tmp'
>
> This is a strange one ..  Windows programs shouldn't be calling
> "g_file_open_tmp" directly.  In the glib header file glib/gfileutils.h
> there is this:
>
>  #ifdef G_OS_WIN32
>  #define g_file_test g_file_test_utf8
>  #define g_file_get_contents g_file_get_contents_utf8
>  #define g_mkstemp g_mkstemp_utf8
>  #define g_file_open_tmp g_file_open_tmp_utf8
>  #endif
>
> G_OS_WIN32 ought to be defined automatically.  I guess you could try
> defining it manually for this one file.
>
> I have verified that we export "g_file_open_tmp_utf8" in our DLL.
>
>> /home/ryanm/Code/dbus-glib/dbus/dbus-binding-tool-glib.c:830:
>> undefined reference to `_g_spawn_async_with_pipes'
>
> Same situation as above.  The link should be happening with the
> internal symbol "g_spawn_async_with_pipes_utf8".
>
>> dbus-glib-tool.o: In function `main':
>> /home/ryanm/Code/dbus-glib/dbus/dbus-glib-tool.c:392: undefined
>> reference to `_g_io_channel_new_file'
>
> As above ("g_io_channel_new_file_utf8").
>
>> ./.libs/libdbus-gtool.a(dbus-gloader-expat.o): In function
>> `description_load_from_file':
>> /home/ryanm/Code/dbus-glib/dbus/dbus-gloader-expat.c:176: undefined
>> reference to `_g_file_get_contents'
>
> As above ("g_file_get_contents_utf8").
>
> Rich.

Very strange. Putting in the following silly hack just under the headers:

#ifdef G_OS_WIN32
#define _FOO_ windows;
#else
#define _FOO_ notwindows;
#endif
_FOO_

results in:

i686-pc-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I..
-I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include
-I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include
-DDBUS_COMPILATION=1 -DDBUS_LOCALEDIR=\"/usr/local/share/locale\"
-DDBUS_API_SUBJECT_TO_CHANGE=1   -g -O2 -Wall -Wchar-subscripts
-Wmissing-declarations -Wmissing-prototypes -Wnested-externs
-Wpointer-arith -Wcast-align -Wfloat-equal -Wsign-compare -MT
dbus-binding-tool-glib.o -MD -MP -MF .deps/dbus-binding-tool-glib.Tpo
-c -o dbus-binding-tool-glib.o dbus-binding-tool-glib.c
dbus-binding-tool-glib.c:48: warning: data definition has no type or
storage class
dbus-binding-tool-glib.c:48: warning: type defaults to 'int' in
declaration of 'notwindows'

Which means G_OS_WIN32 is not being set...

Ideas where is should be set, or what's gone wrong?

Cheers,
_______________________________________________
fedora-mingw mailing list
[email protected]
https://admin.fedoraproject.org/mailman/listinfo/fedora-mingw

Reply via email to