#include <gtk/gtk.h>
#include <gtksourceview/gtksourceview.h>
static gboolean delete_event(GtkWidget *widget, GdkEvent *event, gpointer data) {
gtk_main_quit();
}
int main(int argc, char *argv[]) {
gtk_init (&argc, &argv);
/* Set up window */
GtkWidget *window;
window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
g_signal_connect(window, "delete-event", G_CALLBACK(delete_event), NULL);
/* Draw widgets */
gtk_widget_show (window);
gtk_main ();
return 0;
}
这是我的代码,我是这样编译的:
gcc -o file `pkg-config --cflags --libs gtk+-3.0 gtksourceview-2.0` file.c
知道我做错了什么吗?谢谢你。
In file included from /usr/include/gtksourceview-2.0/gtksourceview/gtksourceview.h:30:0,
from lidedit.c:2:
/usr/include/gtksourceview-2.0/gtksourceview/gtksourcecompletion.h:60:2: error: unknown type name ‘GtkObject’