GtkBuilder, win32 signals
I'm doing some tests with GtkBuilder and I've built a simple program that open a window with a pair of buttons with a signal for each button and it works perfectly in linux. I've tried to crosscompile it to win32 with this command line: i586-mingw32msvc-gcc -o main.exe main.c -mno-cygwin -mms-bitfields -I$CROSSDIR/include/gtk-2.0/glib-2.0 -I$CROSSDIR/lib/gtk2/glib-2.0/include/ -I$CROSSDIR/include/cairo -I$CROSSDIR/include/gtk-2.0 -I$CROSSDIR/include/atk-1.0 -I$CROSSDIR/include/pango-1.0 -I$CROSSDIR/lib/gtk-2.0/include -s -L$CROSSDIR/lib/gtk-2.0 -lgtk-win32-2.0 -lgdk-win32-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lpango-1.0 -lpangowin32-1.0 -lgmodule-2.0 -lgobject-2.0 -lglib-2.0 -lgthread-2.0 -Wl,--export-dynamic This is mostly the line I use in our production enviroment, the program compile and link, but complains about missing signal handlers when I call: gtk_builder_connect_signals (b, NULL); I'm wondering if the gmodule inspecting feature to link the handlers is broken in win32 or if I have to add some more flag (gmodule-2.0.pc of the win32 dev archive doesn't show anything relevant...) and g_module_supported() returns true! -- Bye, Gabry ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: GtkBuilder, win32 signals
On 2/13/08, Tor Lillqvist [EMAIL PROTECTED] wrote: I'm wondering if the gmodule inspecting feature to link the handlers is broken in win32 or if I have to add some more flag I quote the documentation for gtk_builder_connect_signals() in trunk: * When compiling applications for Windows, you must declare signal callbacks * with G_MODULE_EXPORT, or they will not be put in the symbol table. * On Linux and Unices, this is not necessary; applications should instead * be compiled with the -Wl,--export-dynamic CFLAGS, and linked against * gmodule-export-2.0. I.e. define your callback functions like this: G_MODULE_EXPORT int foobar (...) { ... } That works perfectly thanks, I'm replying to the list just because this is not available in the stable documentation in gtk.org and maybe someone else has interest on this topic. Nice addon this GtkBuilder BTW :) I think I'll try to move on the development of our applications from the built in code generation to this, the fact that doesn't need an external library and that connects signals is a big plus over the libglade approach. -- Bye, Gabry ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list