首页 > 代码库 > 求救:如何在Eclipse IDE for C/C++ Developers中正确编译GTK程序?

求救:如何在Eclipse IDE for C/C++ Developers中正确编译GTK程序?

出现错误信息如下,请问大牛该如何解决?
00:52:56 **** Incremental Build of configuration Debug for project Again ****
make all 
Building file: ../why.c
Invoking: GCC C Compiler
gcc "../why.c" -I/usr/include/glib-2.0 -I/usr/include/atk-1.0 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/include/cairo -I/usr/lib/i386-linux-gnu/gtk-2.0/include -I/usr/lib/i386-linux-gnu/glib-2.0/include -I/usr/include/gtk-2.0 -O0 -g3 -Wall ‘pkg-config --cflags gtk+-2.0‘ -MMD -MP -MF"why.d" -MT"why.d" -o "why.o"
/tmp/cciyb0Cn.o: In function ‘main’:
/home/shw/workspace/Again/Debug/../why.c:5: undefined reference to ‘gtk_init’
/home/shw/workspace/Again/Debug/../why.c:6: undefined reference to ‘gtk_window_new’
/home/shw/workspace/Again/Debug/../why.c:7: undefined reference to ‘gtk_widget_show’
/home/shw/workspace/Again/Debug/../why.c:8: undefined reference to ‘gtk_main’
collect2: ld returned 1 exit status
make: *** [why.o] Error 1


已经安装gtk 2.24.10、Eclipse IDE for C/C++ Developers;已经按<a target=_blank href=http://www.mamicode.com/"http://blog.csdn.net/sunny2038/article/details/7082164">http://blog.csdn.net/sunny2038/article/details/7082164 配置过Eclipse;已经……>

求救:如何在Eclipse IDE for C/C++ Developers中正确编译GTK程序?