Basic Questions on gtk/glib



I am trying to use gtk for the first time. I have developed a simple
program with basic function calls. At the top of the code, I have the
statement:

     #include <gtk/gtk.h>

I compile the program as: gcc -o gtk_ex gtk_example.c  - I get the
following error messag:

     In file included from /usr/include/gdk/gdktypes.h:33,
                      from /usr/include/gdk/gdk.h:31,
                      from /usr/include/gtk/gtk.h:31,
                      from gtk_example.c:1:
     /usr/include/glib.h:66: glibconfig.h: No such file or
     directory

I change the compilation statement to identify the directory where
glibconfig.h is located (i.e. - gcc -o gtk_ex -I /usr/lib/glib/include
gtk_example.c). I get:

     gtk_example.c: In function `main':
     gtk_example.c:27: warning: assignment makes pointer from
     integer without a cast
     /tmp/cca012001.o: In function `destroyapp':
     /tmp/cca012001.o(.text+0x9): undefined reference to `g_print'
     /tmp/cca012001.o(.text+0x11): undefined reference to
     `gtk_main_quit'
     /tmp/cca012001.o: In function `main':
     /tmp/cca012001.o(.text+0x2f): undefined reference to
     `gtk_init'
     /tmp/cca012001.o(.text+0x39): undefined reference to
     `gtk_wind_new'
     /tmp/cca012001.o(.text+0x73): undefined reference to
     `gtk_type_check_object_cast'
     /tmp/cca012001.o(.text+0x85): undefined reference to
     `gtk_signal_connect'
     /tmp/cca012001.o(.text+0x91): undefined reference to
     `gtk_widget_show'
     /tmp/cca012001.o(.text+0x99): undefined reference to
     `gtk_main'


It appears that my libraries cannot be located. I have installed the
following rpm packages for glib and gtk:

     glibc-profile-2.0.7-29
     glib10-1.0.6-4.1
     glib-1.2.1-1
     glibc-debug-2.0.7-29
     glibc-devel-2.0.7-29
     glib-devel-1.2.1-1
     glibc-2.0.7-29
     gtk+10-1.0.6-4.1
     gtk+-1.2.1-7
     gtk-engines-0.5-11
     gtk---1.0.0-2
     gtk---devel-1.0.0-2
     gtk+-devel-1.2.1-7

I would appreciate any recommendations on how related to installation
and/or making the libraries known to my application.

Thanx,
Steve






--
Steve Ettorre
e-mail: sme@nycap.rr.com
-------------------------------------------
"...thinking is not consciousness -
 it requires hard work..." - Rush Limbaugh
-------------------------------------------




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