[Glade-users] glade_xml_signal_autoconnect woes

Sudharshan S wrote:
On Tue, 2006-11-21 at 10:21 -0500, Tristan Van Berkom wrote:

You can go ahead and put callbacks in any area of your app, or even
in a shared lib that your app is linking against - note you might
find it tedious to seperate callback code by widget, note2 since you
are working with a dynamic UI you probably want to abstract the GUI
from your callback code.

Ok Ok..I will keep that in mind..Thanks

Well something is askew here, care to post the output of "make" in your
project so I can verify you put --export-dynamic in the correct linker stage ?

Here.it is. The project is just a dummy one, with the main()
initializing all the stuff and loading the xml file. the callbacks are
present in another file. The UI is made up of a number of widgets.

Here is your problem:
gcc -g -O2 -o gmedcon gmedcon.o -Wl,--export-dynamic  /usr/lib/libglade-2.0.so /usr/lib/libgtk-x11-2.0.so 
/usr/lib/libgdk-x11-2.0.so /usr/lib/libatk-1.0.so /usr/lib/libgdk_pixbuf-2.0.so -lm 
/usr/lib/libpangocairo-1.0.so -lfontconfig -lXext 
/usr/lib/libXrender.so -lXinerama -lXi -lXrandr /usr/lib/libXcursor.so -lXfixes /usr/lib/libpango-1.0.so 
/usr/lib/libcairo.so -lX11 
/usr/lib/libgobject-2.0.so /usr/lib/libgmodule-2.0.so -ldl /usr/lib/libglib-2.0.so

You have the --export-dynamic right here (only you seem to add it also
at the compile stage with the compile flags which is useless, you only
need it here), and you probably have them global as you should, but -
you didnt even include them in your executable, you just compile gmedcom.c
into gmedcom.o and never add a compiled gmedcom-callbacks.o to the binary.

You should also try an "nm myapp" and see if your callback symbols are
indeed exposed in the text segment of your binary (i.e. marked with "T").

U glade_xml_new
U glade_xml_signal_autoconnect
U gtk_init
U gtk_main
Should 'U' be 'T' here?

No, we are not looking for those symbols, we are looking for the callbacks,
i.e. "T foo_buttton_clicked_cb" etc... (I believe the "U" idendifier means
that it was referenced by your binary but your binary doesnt contain the
actual stub).


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