hi,
Im teaching myself to program in c and im having a real hard time figuring
out how to get gcc to know how to find the functions it need from shared
object files when linking.
I'm currently working on the first simple gtk program that's in the gtk
info page. when i try to compile I get the error:
   $ gcc -o gtktest gtktest.c
/tmp/cca031931.o: In function `main':
/tmp/cca031931.o(.text+0x1d): undefined reference to `gtk_init'
/tmp/cca031931.o(.text+0x44): undefined reference to `gtk_window_new'
/tmp/cca031931.o(.text+0x55): undefined reference to `gtk_widget_show'
/tmp/cca031931.o(.text+0x5d): undefined reference to `gtk_main'

Ive also been getting the same thing when trying to use math.h. 
After reading the info pages for gcc I tried using the -l and -L options
to tell the linker where to find files. But when i did a -lgtk I ended up
with more undefined refrences to things in gdk and when i added -lgdk even
more. There has to be a better way to do this. Thanks
        jackson

                          _______
#********************#   / _____ \
# D. Jackson Peacock #  / /_____\ \
# [EMAIL PROTECTED]   #  |___   __ |
# ICQ 25755468       #      | |_/ /
# PO Box 2102        #      |  __/  
# Socorro, NM 87801  #  --__/ /
#********************#  \____/



Reply via email to