Re: "Cannot finding signal handler" even after compiling with -rdynamic
- From: Ian Chapman <ichapman videotron ca>
- To: Jay Aurabind <jay aurabind gmail com>, gtk-list gnome org
- Subject: Re: "Cannot finding signal handler" even after compiling with -rdynamic
- Date: Sun, 17 Jan 2016 16:29:46 -0500
Yes, I had something like that and ended with this which I hope may help
you. I was thinking pull the widgets out of the glade file if that
makes sense. Ian
main.cpp
GtkWidget *Battery, *Temp, *Chip_volts; //these are GtkProgressBar
derived from glade.
int
main (int argc, char *argv[])
{
GtkBuilder *builder;
GtkWidget *window;
printf("Entered gtk_init.\n");
gtk_init (&argc, &argv); //Gets gtk going.
builder = gtk_builder_new ();
gtk_builder_add_from_file (builder, "main.glade", NULL);
window = GTK_WIDGET (gtk_builder_get_object (builder, "window"));
Battery = GTK_WIDGET (gtk_builder_get_object (builder, "Battery"));
Temp = GTK_WIDGET (gtk_builder_get_object (builder, "Temp"));
Chip_volts = GTK_WIDGET (gtk_builder_get_object (builder,
"Chip_volts"));
gtk_builder_connect_signals (builder, NULL);
g_object_unref (G_OBJECT (builder));
gtk_widget_show (window);
printf("Main set up and showing window. \n");
// ****************************************************************
gtk_main ();
printf("Exiting MAIN. \n");
return 0;
}
On 01/17/16 10:25, Jay Aurabind wrote:
Hi,
I am learning GTK programming. I am using glade to create a UI and
then using GtkBuilder to show it.
When I run my application, it gives number errors regarding signal handlers:
------------------------------------------------------------------------------------------------------------------
(vaken_gtk:11467): Gtk-WARNING **: Could not find signal handler
'cb_ld_payload'. Did you compile with -rdynamic?
(vaken_gtk:11467): Gtk-WARNING **: Could not find signal handler
'cb_loadkey'. Did you compile with -rdynamic?
(vaken_gtk:11467): Gtk-WARNING **: Could not find signal handler
'cb_genkey'. Did you compile with -rdynamic?
------------------------------------------------------------------------------------------------------------------
I have these functions in the same file. One of them look like:
----------------------------------------------------------------------------------------
static void cb_genkey(GtkWindow *wid,gpointer user_data) {
printf("Hi\n");
}
----------------------------------------------------------------------------------------
I found some other posts in which people got the issue solved after
putting proper compiler/linker flags. I am using Anjuta and tried a
lot of combination for passing "-rdynamic" and/or
"-Wl,--export-dynamic". Yet my application always complain it cannot
find the signal handler.
My make -n output (removing echo) is:
------------------------------------------------------------------------------------------------------------------
gcc -DHAVE_CONFIG_H -I. -I/home/aj/learning/c/gtk/vaken/src -I..
-DPACKAGE_LOCALE_DIR=\""/usr/local/share/locale"\"
-DPACKAGE_SRC_DIR=\""/home/aj/learning/c/gtk/vaken/src"\"
-DPACKAGE_DATA_DIR=\""/usr/local/share/vaken_gtk"\" -pthread
-I/usr/include/gtk-3.0 -I/usr/include/at-spi2-atk/2.0
-I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0
-I/usr/lib64/dbus-1.0/include -I/usr/include/gtk-3.0
-I/usr/include/gio-unix-2.0/ -I/usr/include/cairo
-I/usr/include/pango-1.0 -I/usr/include/harfbuzz
-I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo
-I/usr/include/pixman-1 -I/usr/include/freetype2
-I/usr/include/libpng16 -I/usr/include/freetype2 -I/usr/include/libdrm
-I/usr/include/libpng16 -I/usr/include/gdk-pixbuf-2.0
-I/usr/include/libpng16 -I/usr/include/glib-2.0
-I/usr/lib64/glib-2.0/include -Wl,--export-dynamic -rdynamic -g -O0
-MT vaken_gtk-main.o -MD -MP -MF .deps/vaken_gtk-main.Tpo -c -o
vaken_gtk-main.o `test -f 'main.c' || echo
'/home/aj/learning/c/gtk/vaken/src/'`main.c
mv -f .deps/vaken_gtk-main.Tpo .deps/vaken_gtk-main.Po
rm -f vaken_gtk
gcc -Wl,--export-dynamic -rdynamic -g -O0 -o vaken_gtk
vaken_gtk-main.o -lgtk-3 -lgdk-3 -lpangocairo-1.0 -lpango-1.0
-latk-1.0 -lcairo-gobject -lcairo -lgdk_pixbuf-2.0 -lgio-2.0
-lgobject-2.0 -lglib-2.0
-----------------------------------------------------------------------------------------------------------------
Still the application complains about missing signal handlers. Full C
code at https://paste.gnome.org/pdg0iivsg
Glade UI file at https://paste.gnome.org/ppnpbtkid
Please help.
[
Date Prev][
Date Next] [
Thread Prev][Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]