0
votes

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: http://i.imgur.com/FR58rhT.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.

1
Hi. It could help us to answer if you post the part of your code where you create the signal connection. - Jorge Torres
Sorry. I was trying to add him in pre/code tags but I can't deal with warning about bad format of code. Here is whole code pastebin.com/FCVTahbv - user5765096
@teez pre/code tags aren't used on Stack Overflow: to format a large block of code, prefix every line by 4 spaces. The {} button on the toolbar does this for you; select the code and click it. - andlabs

1 Answers

0
votes

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