Re: Compiling GTK




Tony Peterson <capeters@physics.Arizona.EDU> writes:

> I've been trying to compile GTK and everything works great until it tries
> to compile testgtk. I then get a long string of errors similar to
> 
> ../gdk/.libs/libgdk.so: undefined reference to `XFreePixmap'
> 
> The compile command is
> 
> gcc -g -O2 -DGTK_NO_CHECK_CASTS -Wall -DUSE_XIM -o .libs/testgtk testgtk.o
> -Wl,--rpath -Wl,/usr/local/lib .libs/libgtk.so -Wl,--rpath
> -Wl,/usr/local/lib ../gdk/.libs/libgdk.so -L/usr/X11R6/lib
> -L/usr/X11R6/lib -Wl,--rpath -Wl,/usr/local/lib ../glib/.libs/libglib.so
> -lm
> 
> If I attach a -lX11 to the end this list shrinks to the following
> 
> /usr/X11R6/lib/libX11.so: undefined reference to `getpwuid_r'
> /usr/X11R6/lib/libX11.so: undefined reference to `getpwnam_r'
> 
> What am I doing wrong? Should I be linking in the X11 library like this?
> Forgive me but I'n a neophyte.

That last bit is fairly revealing. What is happening is that
when GTK is configured, it tries a similar compilation and
got a similar error, so it decided you didn't have any X libraries. 
Instead of aborting the configuration (as it should), it just
continued on without them, until it tried to link testgtk.

I think what your problem is is that the X libraries you have
are linked against a different C library than the C library
on your machine. (It is an X-library - C-library incompatibility
in any case). So you might want to try updating one or
both of those and see if that helps.

Regards,
                                        Owen



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