gtktree和gtktext使用时要在文件中定义GTK_ENABLE_BROKEN

Posted on 2015-04-22 21:18  尚河果农  阅读(231)  评论(0编辑  收藏  举报

     linux下调试程序,出现如下错误:

/tmp/ccG8fpwg.o: In function `apache_viewlog_form':
apache.c:(.text+0x776): undefined reference to `GTK_TEXT'
apache.c:(.text+0x789): undefined reference to `GTK_TEXT'
apache.c:(.text+0x7c3): undefined reference to `GTK_TEXT'
/tmp/ccSLZMdn.o: In function `form_dns_tree_add':
dns.c:(.text+0x2f1): undefined reference to `GTK_TREE'
dns.c:(.text+0x32a): undefined reference to `GTK_TREE_ITEM'
collect2: ld 返回 1
make: *** [clinet] 错误 1

因为程序中使用了`GTK_TEXT'和`GTK_TREE',所以需要在引用头文件前加上:

#define  GTK_ENABLE_BROKEN

Copyright © 2024 尚河果农
Powered by .NET 8.0 on Kubernetes