开发者

Gtk-WARNING Could not find signal handler on netbeans

I'm building an interface using glade and gtk programming on c using netbeans. I've set up my project following this tutorial. I even added libgmodule2-0.so and libglib2-0.so to the linker options of netbeans. When I run i get the warning Gtk-WARNING Could not find signal handle. When I close the mainwindow nothing happens (this is where my signal should be caught)

If I compile my program like this (not using netbeans)

gcc -o tut main.c $(pkg-config --cflags --libs gtk+-2.0 gmodule-2.0) 

it works fine. When I close the mainwindow it closes.

I like using IDEs because all the features I get (specially 开发者_高级运维debugging). Any suggestion for this problem?


I think that adding libgmodule2-0.so and libglib2-0.so to the linker options is not enough. Run the command pkg-config --cflags gtk+-2.0 gmodule-2.0 in your terminal and see what it says. Add any directories listed with -I to the include directories of your NetBeans project, and add any other flags to the C compiler options.

Then run pkg-config --libs gtk+-2.0 gmodule-2.0 in your terminal and add anything listed there to the linker options.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜