QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 783|回复: 4

熟悉glade朋友请进,我用glade做的界面,在里面加入少

[复制链接]
发表于 2004-8-17 10:32:50 | 显示全部楼层 |阅读模式
生成编码后先./autogen.sh.我进src 在interfaces.c里加了生成树和树项的程序,包含了头文件<gtk/gtk.h>,修改了makefile如下:
INTLLIBS = -lgtk -lgdk

make时出错:
interface.o(.text+0x115): In function `create_window':
/myproject/play3/src/interface.c:71: undefined reference to `GTK_TREE'
interface.o(.text+0x12d):/myproject/play3/src/interface.c:73: undefined reference to `GTK_TREE_ITEM'
interface.o(.text+0x1c:/myproject/play3/src/interface.c:83: undefined reference to `GTK_TREE'
interface.o(.text+0x1f1):/myproject/play3/src/interface.c:88: more undefined references to `GTK_TREE
' follow
interface.o(.text+0x209): In function `create_window':
/myproject/play3/src/interface.c:90: undefined reference to `GTK_TREE_ITEM'
interface.o(.text+0x22:/myproject/play3/src/interface.c:92: undefined reference to `GTK_TREE'
interface.o(.text+0x2a4):/myproject/play3/src/interface.c:100: undefined reference to `GTK_TREE'
interface.o(.text+0x2cd):/myproject/play3/src/interface.c:104: more undefined references to `GTK_TRE
E' follow
interface.o(.text+0x2e5): In function `create_window':
/myproject/play3/src/interface.c:106: undefined reference to `GTK_TREE_ITEM'
interface.o(.text+0x304):/myproject/play3/src/interface.c:108: undefined reference to `GTK_TREE'
interface.o(.text+0x3a9):/myproject/play3/src/interface.c:120: more undefined references to `GTK_TRE
E' follow
interface.o(.text+0x3c1): In function `create_window':
/myproject/play3/src/interface.c:122: undefined reference to `GTK_TREE_ITEM'
interface.o(.text+0x45c):/myproject/play3/src/interface.c:132: undefined reference to `GTK_TREE'
collect2: ld returned 1 exit status
make[2]: *** [play3] Error 1
make[2]: Leaving directory `/myproject/play3/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/myproject/play3'
make: *** [all] Error 2
我查过了,GTK_TREE, GTK_TREE_ITEM 均是gtk/gtktree.h里面的宏.gtk/gtktree.h包含在头文件gtk/gtk.h

这个问题已经困绕了我很长时间了.请高手指点!!!谢谢
发表于 2004-8-17 12:22:14 | 显示全部楼层
INTLLIBS原来是什么?
回复

使用道具 举报

 楼主| 发表于 2004-8-17 15:13:12 | 显示全部楼层

up

INTLLIBS是glade编译后生成的makefile文件中的一项,原来INTLLIBS为空,这是我自给加进去的!
回复

使用道具 举报

发表于 2004-8-17 17:00:19 | 显示全部楼层
gtk1.2还是gtk2?
INTLLIBS = -lgtk -lgdk没必要加,而且gtk2的库名不叫gtk
回复

使用道具 举报

发表于 2004-8-18 10:23:35 | 显示全部楼层
用 `pkg-config --cflags --libs gtk+-2.0` 获得编译器标志
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

GMT+8, 2024-11-7 15:37 , Processed in 0.040164 second(s), 15 queries .

© 2021 Powered by Discuz! X3.5.

快速回复 返回顶部 返回列表