Re: Still some Problems with libXext.a

Harald Koenig (koenig@tat.physik.uni-tuebingen.de)
Tue, 18 Jun 1996 10:38:21 +0200 (MET DST)


> I don't know if I'm the only one, but I often got compiling errors due
> the use of libXext.a . The error messages looks like:
> /usr/X11/lib/libXext.a(extutil.o): In function `XextAddDisplay':
> extutil.c(.text+0xf4): undefined reference to `XInitExtension'
> /usr/X11/lib/libXext.a(extutil.o)(.lita+0x10): undefined reference to `XInitExtension'
>
> I found these messages quit frustrating, because I read them as an
> error in Xext and not an error in the program I would like to
> use. Surprisingly on my old i386 the compiling runs smooth but *very*
> slow.

I'd say that you're specifying the libraries in the wrong order.
note that the libs on the command line for linking depend on the
proper sequence; for more information you should send the
complete command line for linking (try rearanging libs first and
check in which lib the unresolved externals are
(e.g. nm /usr/lib/libX11.{a,sa,...} | more).

XInitExtension from your example is in libX11, so you have to specify
this lib *after* libXext ("-lXext -lX11" and not "-lX11 -lXext")...

Harald

-- 
All SCSI disks will from now on                     ___       _____
be required to send an email notice                0--,|    /OOOOOOO\
24 hours prior to complete hardware failure!      <_/  /  /OOOOOOOOOOO\
                                                    \  \/OOOOOOOOOOOOOOO\
                                                      \ OOOOOOOOOOOOOOOOO|//
Harald Koenig,                                         \/\/\/\/\/\/\/\/\/
Inst.f.Theoret.Astrophysik                              //  /     \\  \
koenig@tat.physik.uni-tuebingen.de                     ^^^^^       ^^^^^