Compoilation error
- From: "Joaquin Henriquez Alzola (REE)" <Joaquin Henriquez-Alzola ree ericsson se>
- To: "'gtk-list gnome org'" <gtk-list gnome org>
- Subject: Compoilation error
- Date: Tue, 28 Jan 2003 18:22:13 +0100
Hi people,
I have a compilation error when I try to compile this program.
# more gtk2.c
#include <gtk/gtk.h>
void hello( GtkWidget *widget, gpointer data )
{
g_print ("Hello World\n");
}
gint delete_event( GtkWidget *widget, GdkEvent *event, gpointer data )
{
g_print ("delete event occurred\n");
return(TRUE);
}
void destroy( GtkWidget *widget, gpointer data )
{
gtk_main_quit();
}
int main( int argc, char *argv[] )
{
GtkWidget *window;
GtkWidget *button;
gtk_init(&argc, &argv);
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_signal_connect (GTK_OBJECT (window), "delete_event", GTK_SIGNAL_FUNC (de
lete_event), NULL);
gtk_signal_connect (GTK_OBJECT (window), "destroy", GTK_SIGNAL_FUNC (destroy
), NULL);
gtk_container_set_border_width (GTK_CONTAINER (window), 10);
button = gtk_button_new_with_label ("Hello World");
gtk_signal_connect (GTK_OBJECT (button), "clicked", GTK_SIGNAL_FUNC (hello),
NULL);
gtk_signal_connect_object (GTK_OBJECT (button), "clicked", GTK_SIGNAL_FUNC (
gtk_widget_destroy), GTK_OBJECT (window));
gtk_container_add (GTK_CONTAINER (window), button);
gtk_widget_show (button);
gtk_widget_show (window);
gtk_main ();
return(0);
}
I get this message:
# gcc -Wall -g gtk2.c -o gtk `gtk-config --cflags` `gtk-config --libs`
ld: fatal: library -lgmodule: not found
ld: fatal: library -lglib: not found
ld: fatal: File processing errors. No output written to gtk
collect2: ld returned 1 exit status
#
What is the matter?? I have installed gnu make and glib, zlib, pkgconfig. I don't know what else could be wrong. Can you help please?
BR,
Joaquin
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]