Hello all,
i try to program a simple dialog without success.
Here is my actual code:
<code>
#include <unistd.h>
#include <stdlib.h>
#include <gtk/gtk.h>
void quick_message () {
GtkWidget *system_dialog, *label;
/* Create the widgets */
system_dialog = gtk_dialog_new ();
gtk_widget_set_name (system_dialog, "system_dialog");
gtk_window_set_title (GTK_WINDOW (system_dialog), "System Settings");
gtk_window_set_position (GTK_WINDOW (system_dialog), GTK_WIN_POS_CENTER);
gtk_window_set_modal (GTK_WINDOW (system_dialog), TRUE);
gtk_window_set_default_size (GTK_WINDOW (system_dialog), 500, 280);
gtk_window_set_resizable (GTK_WINDOW (system_dialog), FALSE);
gtk_window_set_type_hint (GTK_WINDOW (system_dialog),
GDK_WINDOW_TYPE_HINT_DIALOG);
label = gtk_label_new ("");
/* Ensure that the dialog box is destroyed when the user responds. */
g_signal_connect_swapped (system_dialog,
"response",
G_CALLBACK (gtk_widget_destroy),
system_dialog);
/* Add the label, and show everything we've added to the dialog. */
gtk_container_add (GTK_CONTAINER (GTK_DIALOG(system_dialog)->vbox),
label);
gtk_widget_show_all (system_dialog);
}
int main(int argc, char *argv[])
{
quick_message();
return 0;
}
</code>
Here is my compile line: "cc -o tc_system_new main.c `pkg-config --cflags
--libs gtk+-2.0 gthread-2.0 glib-2.0`"
And here is my error output:
[snip]
Any suggestions?