Re: an easy question, I assume



brendan cs uchicago edu writes:

> This is what my compile line looks like:
> 
> gcc \
> -I/opt/glib/glib-2.2.1/include/glib-2.0 \
> -I/opt/glib/glib-2.2.1/lib/glib-2.0/include \
> -L/opt/glib/glib-2.2.1/lib \
> -I/opt/gtk/gtk+-2.2.0/include/gtk-2.0 \
> -I/opt/gtk/gtk+-2.2.0/lib/gtk-2.0/include \
> -L/opt/gtk/gtk+-2.2.0/lib \
> -I/opt/pango/pango-1.2.0/include/pango-1.0 \
> -I/opt/atk/atk-1.2.0/include/atk-1.0 \
> test.c

Have you tried using pkg-config which happens to be the best thing
since sliced bread? It can generate the compile and link flags for
you (and has easy-to-use macros for configure scripts):

  $ pkg-config --libs --cflags gtk+-2.0
  -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include
   -I/usr/include/atk-1.0 -I/usr/include/pango-1.0
   -I/usr/include/freetype2 -I/usr/include/glib-2.0
   -I/usr/lib/glib-2.0/include -Wl,--export-dynamic -lgtk-x11-2.0
   -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangoxft-1.0
   -lpangox-1.0 -lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -ldl
   -lglib-2.0
  $

It seems you are missing linking the actual libraries.

-- 
Ole Laursen
http://www.cs.auc.dk/~olau/



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