Hi all!
I've tried creating an about dialog with gtk2 in C.
The api documentation tells me that I can do this in two ways. First, using g_object_new:
Code:
GtkWidget *aboutWindow;
aboutWindow = g_object_new(GTK_TYPE_ABOUT_DIALOG,
"name", "...'",
"version", "0.1",
"copyright", "...",
"comments", "....",
"authors", ".....",
"documenters", "....",
"translator-credits", "....",
"logo", NULL,
NULL);
gtk_widget_show_all(aboutWindow);
Compile fails:
Code:
gcc -o gtk-14 main.c `pkg-config --cflags --libs gtk+-2.0`
main.c: In function `aboutDialog':
main.c:216: error: `GTK_TYPE_ABOUT_DIALOG' undeclared (first use in this function)
main.c:216: error: (Each undeclared identifier is reported only once
main.c:216: error: for each function it appears in.)
Second attempt, using gtk_about_dialog_new() (
http://developer.gnome.org/doc/API/2...outDialog.html):
Code:
GtkWidget *aboutWindow;
aboutWindow = gtk_about_dialog_new();
doesn't work:
Code:
gcc -o gtk-14 main.c `pkg-config --cflags --libs gtk+-2.0`
main.c: In function `aboutDialog':
main.c:226: warning: assignment makes pointer from integer without a cast
/tmp/cczYBpMy.o(.text+0x10a3): In function `aboutDialog':
: undefined reference to `gtk_about_dialog_new'
collect2: ld returned 1 exit status
I can't find anything about 'about_dialog' in my gtk2 header files, and there don't seem to be any example programs using it.
Any clues?
greets
phylor