Search code examples
cgtkglade

Signal in Glade GTK+3 do not work


I am trying to learn how to program a GTK application. I created my first application and here is the callback function:

    void click_button2 (GtkToggleButton *tbutton, gpointer data)
    {

        gtk_main_quit ();

    }

 

And here is how my GTK project looks: https://i.sstatic.net/zCHGr.png

After compiling with:

 gcc -Wall -g -o testGlade test.c pkg-config --cflags --libs gtk+-3.0 gmodule-2.0 

The cal back does not seem to work. Nothing happens when I click the button.


Solution

  • Please add your source code of the test.c for further help.

    Try compiling with -rdynamic option.

    gcc -Wall -g -o testGlade test.c pkg-config --cflags --libs gtk+-3.0 gmodule-2.0 -rdynamic