如何在Eclipse IDE for C/C++ Developers中正确编译GTK程序?(已解决)
来源:互联网 发布:淘宝pc流量是什么意思 编辑:程序博客网 时间:2024/05/23 21:04
<span style="color: rgb(51, 51, 51); font-family: Arial; font-size: 14px; line-height: 25.99431800842285px; background-color: rgb(240, 240, 240);"><strong>(</strong></span><span style="color: rgb(51, 51, 51); font-family: Arial; font-size: 14px; background-color: rgb(240, 240, 240); line-height: 25.99184799194336px;"><strong>已解决,详见<a target=_blank target="_blank" href="http://blog.csdn.net/acmerhlj/article/details/39720183" style="color: rgb(0, 0, 0); text-decoration: none; font-family: 'Microsoft YaHei'; line-height: 30px;">Ubuntu 12.04下在Eclipse IDE for C/C++ Developers中运行C语言的GTK程序</a></strong></span><span style="color: rgb(51, 51, 51); font-family: Arial; font-size: 14px; line-height: 25.99431800842285px; background-color: rgb(240, 240, 240);"><strong>)</strong></span>
出现错误信息如下,请问大牛该如何解决?<strong><span style="font-size:14px;">(<span style="color: rgb(51, 51, 51); font-family: Arial; line-height: 25.99184799194336px;">已解决,详见<a target=_blank href="http://blog.csdn.net/acmerhlj/article/details/39720183" style="color: rgb(0, 0, 0); text-decoration: none; font-family: 'Microsoft YaHei'; line-height: 30px;">Ubuntu 12.04下在Eclipse IDE for C/C++ Developers中运行C语言的GTK程序</a></span>)</span></strong>00:52:56 **** Incremental Build of configuration Debug for project Again ****make all Building file: ../why.cInvoking: GCC C Compilergcc "../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 statusmake: *** [why.o] Error 1已经安装Ubuntu(ubuntu-12.04-desktop-i386)、gtk 2.24.10、Eclipse IDE for C/C++ Developers(eclipse-cpp-luna-R-linux-gtk.tar);<span style="font-family: Arial, Helvetica, sans-serif;">在终端可以编译并显示用C写的gtk窗口,在Eclipse里能编译普通的C/C++程序。</span>已经按http://blog.csdn.net/sunny2038/article/details/7082164的方法配置过Eclipse;已经……<span style="font-family: Arial, Helvetica, sans-serif;">包含很多的头文件是因为提示找不到各个头文件,也尝试设置PKG_CONFIG_PATH。</span>还是出错,搜到类似问题(http://bbs.chinaunix.net/thread-3775510-1-1.html,http://bbs.csdn.net/topics/380110411),但还是改不好,太菜了!Ubuntu环境变量的设置是硬伤!求教大牛:如何才能在Eclipse IDE for C/C++ Developers中正确编译GTK程序?测试的代码:#include <gtk/gtk.h>int main( int argc, char *argv[] ){ GtkWidget *window; gtk_init (&argc, &argv); window = gtk_window_new (GTK_WINDOW_TOPLEVEL); gtk_widget_show (window); gtk_main (); return 0;}
0 0
- 如何在Eclipse IDE for C/C++ Developers中正确编译GTK程序?(已解决)
- Ubuntu下在Eclipse IDE for C/C++ Developers中如何运行C语言的GTK程序?(已解决)
- Ubuntu 12.04下在Eclipse IDE for C/C++ Developers中运行C语言的GTK程序
- Eclipse IDE for C/C++ Developers 开发C/C++
- Ubuntu下使用Eclipse IDE for C/C++ Developers交叉编译和调试
- Eclipse IDE for C/C++ Developers 与 MinGW 配置说明
- Eclipse IDE for C/C++ Developers 开发环境搭建详解
- Windows下的Eclipse IDE for C/C++ Developers, 配置
- ubuntu安装eclipse IDE for C/C++ developers
- ubuntu安装eclipse IDE for C/C++ developers
- Personal Note:Eclipse IDE for C/C++ Developers
- ubuntu下安装eclipse IDE for C/C++ developers
- Linux下安装Eclipse IDE for C/C++ Developers
- ubuntu下安装eclipse IDE for C/C++ developers
- ubuntu下安装eclipse IDE for C/C++ developers
- Eclipse IDE for C/C++ Developers include glib on linux
- Ubuntu 下安装 eclipse 开发环境(Eclipse IDE for C/C++ Developers)
- Ubuntu下安装Eclipse开发环境(Eclipse IDE for C/C++ Developers)
- |和||、&&和&
- leetcode - Binary Tree Maximum Path Sum
- 个人对布局中权重的理解(从现象总结经验)
- 光流法详解
- ubuntu12.04配置Samba服务实现文件夹共享
- 如何在Eclipse IDE for C/C++ Developers中正确编译GTK程序?(已解决)
- C++虚函数表详细解释及实例分析
- Mac OS使用技巧十九:Safari碉堡功能之二查看网页源码
- HDU 4810 Wall Painting 异或性质
- 如何在android上 使用gif图片(android开源库android-gif-drawabl)
- 青蛙的约会 ---- 同余方程(数论)
- nyoj-218-Dinner
- 最简单的基于FFmpeg的AVDevice例子(屏幕录制)
- ArcGIS for javascript 构建GraphicsLayer