免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2574 | 回复: 4

利用glib库写的程序编译报错 [复制链接]

论坛徽章:
0
发表于 2009-12-16 11:26 |显示全部楼层
5可用积分
已经安装了glib,但是编译时出错。不知为什么。
gcc: pkg-config --cflags --libs gthread-2.0: No such file or directory
gcc: pkg-config --cflags --libs glib-2.0: No such file or directory

start.c:9:18: error: glib.h: No such file or directory
start.c:18: error: expected ')' before 'path_file'
start.c: In function 'get_file_name':
start.c:30: warning: assignment discards qualifiers from pointer target type
start.c: In function 'main':
start.c:45: error: 'GThreadPool' undeclared (first use in this function)
start.c:45: error: (Each undeclared identifier is reported only once
start.c:45: error: for each function it appears in.)
start.c:45: error: 'thread_pool' undeclared (first use in this function)
start.c:54: error: 'TRUE' undeclared (first use in this function)
start.c:79: error: 'gpointer' undeclared (first use in this function)
start.c:79: error: expected expression before ')' token
start.c: At top level:
start.c:93: error: expected ')' before 'file_path'

论坛徽章:
0
发表于 2009-12-16 11:28 |显示全部楼层
glib-dev
如果是debina系的话。

论坛徽章:
0
发表于 2009-12-16 11:30 |显示全部楼层
glib-dev当然要装上。
并且,如果你的程序要用pkg-config来查询头文件包含及库文件连接参数的话,则pkg-config也要装上。

论坛徽章:
0
发表于 2009-12-16 11:34 |显示全部楼层
pkg-config装了,要不然装不了glib。
glib-dev没装,试试。
不是debian系,是redhat企业版

论坛徽章:
0
发表于 2009-12-16 12:16 |显示全部楼层
我不相信不装pkg-config,就装不了glib。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP