[Glade-users] signal handler problem



Thank, with yours suggestion in linux all is ok but in windows there is still the problem

I use g++ version:

gcc version 3.2.3 (mingw special 20030504-1)

this is my compile option obtained with 
pkg-config --cflags gtk+-2.0 gmodule-2.0 libglade-2.0

-mms-bitfields -IC:/GTK/include/gtk-2.0 -IC:/GTK/lib/gtk-2.0/include -IC:/GTK/in
clude/atk-1.0 -IC:/GTK/include/cairo -IC:/GTK/include/pango-1.0 -IC:/GTK/include
/glib-2.0 -IC:/GTK/lib/glib-2.0/include -IC:/GTK/include/freetype2 -IC:/GTK/incl
ude/libglade-2.0 -IC:/GTK/include/libxml2

and this my link option obtained with
pkg-config --libs gtk+-2.0 gmodule-2.0 libglade-2.0

-user32 -Wl,-luuid -LC:/GTK/lib -lglade-2.0 -lgtk-win32-2.0 -lxml2 -lgdk-win32-2
.0 -limm32 -lshell32 -lole32 -latk-1.0 -lgdk_pixbuf-2.0 -lpangowin32-1.0 -lgdi32
 -lpangocairo-1.0 -lcairo -lpangoft2-1.0 -lfontconfig -lfreetype -lz -lpango-1.0
 -lm -lgobject-2.0 -lgmodule-2.0 -lglib-2.0 -lintl -liconv

What can I do ?

Thanks



Tristan Van Berkom <tvb at gnome.org> ha scritto: On Wed, 2007-02-14 at 17:59 +0100, salaria113 at yahoo.com 
wrote:
Thanks for your answer , I try to compile under Linux with the
following commands:

g++ -c -DXTHREADS -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include
-I/usr/X11R6/include -I/usr/include/atk-1.0 -I/usr/include/pango-1.0
-I/usr/include/freetype2 -I/usr/include/glib-2.0
-I/usr/lib/glib-2.0/include -I/usr/include/libglade-2.0 main.cpp

and to link

g++ -o Prova -Wl,--export-dynamic main.o -lgtk-x11-2.0 -lgdk-x11-2.0
-latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangoxft-1.0 -lpangox-1.0 -lpango-1.0
-lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0 -lglade-2.0

when i launch ./Prova i have the same error 

When interfacing with the linker, the order of options on the command
line have a significance, you might try reading alot of the gnu ld
manual, or just simply use pkg-config which pretty much always
gets it right.

the linker line would look simply like so:

g++ -o Prova main.o `pkg-config --libs gtk+-2.0 gmodule-2.0`

The gmodule-2.0.pc will ensure that your program is correctly
built with the -Wl,--export-dynamic in the right place.

Cheers,
                    -Tristan

Note: after compiling, look at the output of 
`nm Prova | grep my_signal_callback`, you should get the line:

 0xdeadbeef  T  my_signal_callback

The "T" indicates that "my_signal_callback" did infact appear in the
*text* segment of the resulting binary, thus it is world visible
and the dynamic linker should see it at dlopen() time.




                
---------------------------------
 L'email della prossima generazione? Puoi averla con la  nuova Yahoo! Mail
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/glade-users/attachments/20070219/1d38827d/attachment.html 




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