用anjuta编译gtk程序时出现类似与"main.c::10:21:gtk/gtk.h:没有那个文件和目录"问题的解决

来源:互联网 发布:mysql truncate锁表 编辑:程序博客网 时间:2024/05/16 12:54
用 anjuta 编译程序时会出现类似与"main.c::10:21:gtk/gtk.h:没有那个文件和目录",但是可以使用 创建 并且能执行程序.产生的原因是因为 'pkg-config --cflags gtk-2.0' 惹的祸,因为anjuta在编译时并没有把这个命令输入,解决办法是:
在菜单 设定--commands 中的 compile 项的末尾加入 'pkg-config --cflags gtk-2.0' 注意单引号.
即可.
原文:
It depends on the GTK verion you are using. If you are using GTK 1.x, you should add the output of 'gtk-config --cflags' to your compiler flags. If you are using GTK 2.x, you'll need to use the command 'pkg-config --cflags gtk-2.0' instead.
原创粉丝点击