compile problems



Hello, I am trying to build the hello world program described in the
tutorial document.  I am having some trouble however.  I am sure I am
doing something really stupid, as I am new to linux programming.  Im used
to programming on windows with msvc where I dont have to keep track of all
my libs and stuff.  Anyway, when I compile I get the following list of
errors.  I use the command line "gcc -Wall -g -L/usr/X11R6/lib -lglib
-lgdk -lgtk -lX11 -lXext -lm helloworld.c -o hello_world " 

The gdk, gtk, glib libraries all appear to be in my /usr/local/lib
directory..

I have included all of the information it spits at me when I try to
compile, Im sure you don't need to see all of it, but I figured I'd just
let you decide what was important..

Any help would be greatly appreciated
-Matt
------------------------
/tmp/cca226611.o: In function `callback':
/home/matt/projects/hello/helloworld.c:8: undefined reference
to `g_print'
/tmp/cca226611.o: In function `destroy':
/home/matt/projects/hello/helloworld.c:14: undefined reference
to `gtk_main_quit'
/tmp/cca226611.o: In function `main':
/home/matt/projects/hello/helloworld.c:26: undefined reference
to `gtk_init'
/home/matt/projects/hello/helloworld.c:29: undefined reference
to `gtk_window_new'
/home/matt/projects/hello/helloworld.c:33: undefined reference
to `gtk_window_get_type'
/home/matt/projects/hello/helloworld.c:33: undefined reference
to `gtk_object_check_cast'
/home/matt/projects/hello/helloworld.c:33: undefined reference
to `gtk_window_set_title'
/home/matt/projects/hello/helloworld.c:36: undefined reference
to `gtk_object_get_type'
/home/matt/projects/hello/helloworld.c:36: undefined reference
to `gtk_object_check_cast'  
check_cast'
/home/matt/projects/hello/helloworld.c:36: 
undefined reference to
`gtk_signal_connect'
/home/matt/projects/hello/helloworld.c:41: 
undefined reference to
`gtk_container_get_type'
/home/matt/projects/hello/helloworld.c:41: 
undefined reference to
`gtk_object_check_cast'
/home/matt/projects/hello/helloworld.c:41: 
undefined reference to
`gtk_container_border_width'
/home/matt/projects/hello/helloworld.c:46: 
undefined reference to
`gtk_hbox_new'
/home/matt/projects/hello/helloworld.c:49: 
undefined reference to
`gtk_container_get_type'
/home/matt/projects/hello/helloworld.c:49: 
undefined reference to
`gtk_object_check_cast'
/home/matt/projects/hello/helloworld.c:49: 
undefined reference to
`gtk_container_add'
/home/matt/projects/hello/helloworld.c:52: 
undefined reference to
`gtk_button_new_with_label'
/home/matt/projects/hello/helloworld.c:56: 
undefined reference to
`gtk_object_get_type'
/home/matt/projects/hello/helloworld.c:56: 
undefined reference to
`gtk_object_check_cast'
/home/matt/projects/hello/helloworld.c:56: 
undefined reference to
`gtk_signal_connect'
/home/matt/projects/hello/helloworld.c:61: 
undefined reference to
`gtk_box_get_type'
/home/matt/projects/hello/helloworld.c:61: 
undefined reference to
`gtk_object_check_cast'
/home/matt/projects/hello/helloworld.c:61: 
undefined reference to
`gtk_box_pack_start'     
home/matt/projects/hello/helloworld.c:65:
undefined reference to
`gtk_widget_show'
/home/matt/projects/hello/helloworld.c:68: undefined reference to
`gtk_button_new_with_label'
/home/matt/projects/hello/helloworld.c:72: undefined reference to
`gtk_object_get_type'
/home/matt/projects/hello/helloworld.c:72: undefined reference to
`gtk_object_check_cast'
/home/matt/projects/hello/helloworld.c:72: undefined reference to
`gtk_signal_connect'
/home/matt/projects/hello/helloworld.c:75: undefined reference to
`gtk_box_get_type'
/home/matt/projects/hello/helloworld.c:75: undefined reference to
`gtk_object_check_cast'
/home/matt/projects/hello/helloworld.c:75: undefined reference to
`gtk_box_pack_start'
/home/matt/projects/hello/helloworld.c:80: undefined reference to
`gtk_widget_show'
/home/matt/projects/hello/helloworld.c:82: undefined reference to
`gtk_widget_show'
/home/matt/projects/hello/helloworld.c:84: undefined reference to
`gtk_widget_show'
/home/matt/projects/hello/helloworld.c:87: undefined reference to
`gtk_main'      




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]