怎么样Eclipse IDE for C/C++ Developers正确编译GTK规划?(解决)
<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.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 已经安装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;
}
版权声明:本文博主原创文章。博客,未经同意不得转载。
怎么样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程序) 按"Ubuntu下GTK的安装.编译和測试"( ...
- Eclipse IDE for C/C++ Developers和MinGW安装配置C/C++开发学习环境详解
Eclipse IDE for C/C++ Developers和MinGW安装配置C/C++开发学习环境详解 操作系统:Windows 7 JDK版本:1.6.0_33 Eclipse版本:Juno ...
- Eclipse IDE for Java EE Developers 与 Eclipse Classic(Eclipse Standard)区别
Eclipse下载官网:http://www.eclipse.org/downloads/ 版本: 1.Eclipse classic(Eclipse Standard):Eclipse的标准版; 2 ...
- Eclipse IDE for C/C++ Developers安装配置详解
Eclipse IDE for C/C++ Developers安装配置详解(转) 转自:http://hi.baidu.com/ltb6w/item/986532efd712460f570f1ddc ...
- eclipse ide for java ee developers 开发环境搭建(j2ee)
转载自:http://www.iteye.com/topic/982182 真的是一片很不错的文章啊! 使用eclipse真的有年头了,相信java程序员没有不知道它的,最近在给团队中新来的应届生做指 ...
- ubuntu下安装eclipse IDE for C/C++ developers
序 linux的GUI和windos比起来实在逊色,虽然它的终端模式(命令行模式)非常强大.linux发行版ubuntu的GUI相对其他版本要华丽一些,所以最近由redhat转向ubuntu进行li ...
- eclipse ide for java ee developers 开发环境搭建(J2EE) 【转载】
使用eclipse真的有年头了,相信java程序员没有不知道它的,最近在给团队中新来的应届生做指导,专门讲解了一下Eclipse开发环境的搭建过程, 一是帮助他们尽快的熟悉IDE的使用,二也是保证团队 ...
- Linux下安装JRE和Eclipse IDE for C/C++ Developers
Linux32位,下载eclipse-cpp-luna-R-linux-gtk.tar.gz和jre-8u11-linux-i586.rpm 放到家文件夹中. http://www.eclipse. ...
- Eclipse IDE for java EE Developers下载和安装
1.登录 http://www.eclipse.org/home/index.php ,下载Eclipse IDE for java EE Developers 2.解压缩压缩包到任意路径(推荐:G: ...
随机推荐
- c coding style之学习篇
1. 使用do-while结构去避免潜在的内存泄漏问题. do { p1 = malloc(10); if (null == p1) { break; ...
- (Google面试题)有四个线程1、2、3、4。线程1的功能就是输出1,线程2的功能就是输出2,以此类推.........现在有四个文件ABCD。初始都为空。
现要让四个文件呈如下格式: A:1 2 3 4 1 2.... B:2 3 4 1 2 3.... C:3 4 1 2 3 4.... D:4 1 2 3 4 1.... 请设计程序. 下面举例A,对 ...
- java访问mysql方法数据库
1.下载界面包mysql-connector-java-5.0.8-bin.jar 下载链接 2.程序 (1)载入驱动 (2)编程连接操作 (3)返回结果处理 编程演示样例 import java.s ...
- BZOJ 1324 Exca 神剑 最小割
标题效果:鉴于加权值矩阵,带走一个地方的权利值之后,与其相邻的格儿童权利值变0.问多少可以取出到右值. 思维:Amber论文题目.不难建设,图着色.颜色从S连边,还有一种颜色向T连边.再把相邻的格子连 ...
- Beijing seminar: China shadow banking
Beijing seminar: China shadow banking-张化桥-财新博客-新世纪的常识传播者-财新网 Beijing seminar: China shadow banking
- 传京东副总裁蒉莺春或将接管POP业务-搜狐IT
传京东副总裁蒉莺春或将接管POP业务-搜狐IT 传京东副总裁蒉莺春或将接管POP业务
- Android监控程序本身被卸载方法汇总
本文章由Jack_Jia编写,转载请注明出处. 文章链接: http://blog.csdn.net/jiazhijun/article/details/10157901 作者:Jack_Jia ...
- Hermes和开源Solr、ElasticSearch
不同
Hermes和开源Solr.ElasticSearch不同 谈到Hermes的索引技术.相信非常多同学都会想到Solr.ElasticSearch.Solr.ElasticSearc ...
- OpenStack安装与配置2
第二部分 OpenStack安装与配置 一.引言 本章内容讲解如何在3台物理机上搭建最小化云平台,这3台机器分为称为Server1.Server2和Client1,之后的各章也是如此.Server ...
- WampServer:轻松配置Wordpress安装环境
WordPress运行环境 PHP 5.2.4 或更新版本(不支持第三方推出的“PHP 6.0”) MySQL 5.0 或更新版本 Apache mod_rewrite 模块(可选,用于支持“固定链接 ...