Kod: Markera allt
#include <gtk/gtk.h>
int main( int argc, char *argv[])
{
GtkWidget *window;
gtk_init(&argc, &argv);
window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
gtk_widget_show(window);
gtk_main();
return 0;
}
Kod: Markera allt
gcc -o hellogtk hellogtk.c `pkg-config --libs --cflags gtk+-2.0`
Kod: Markera allt
Package gtk+-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gtk+-2.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gtk+-2.0' found
hellogtk.c:1:21: fel: gtk/gtk.h: Filen eller katalogen finns inte
hellogtk.c: I funktion "main":
hellogtk.c:5: fel: "GtkWidget" är odeklarerad (första förekomsten i denna funktion)
hellogtk.c:5: fel: (Varje odeklarerad identifierare rapporteras bara en gång
hellogtk.c:5: fel: för varje funktion den finns i.)
hellogtk.c:5: fel: "window" är odeklarerad (första förekomsten i denna funktion)
hellogtk.c:9: fel: "GTK_WINDOW_TOPLEVEL" är odeklarerad (första förekomsten i denna funktion)
