This is the mail archive of the
cygwin-xfree@sources.redhat.com
mailing list for the Cygwin project.
RE: help with link error: undefined reference to XGetHostname
- To: "XFree86, Cygwin" <cygwin-xfree at sourceware dot cygnus dot com>
- Subject: RE: help with link error: undefined reference to XGetHostname
- From: Suhaib Siddiqi <ssiddiqi at inspirepharm dot com>
- Date: Fri, 16 Feb 2001 14:40:39 -0500
> $ make
> rm -f xtetris.exe
> gcc -o xtetris.exe -O2 -pedantic -fno-strength-reduce
> -fnative-struct -m486 -g -Wall -L/usr/X11R6/lib main.o
> init.o shape.o support.o notify.o window.o
> score.o draw.o -lXaw -lXmu -lXt -lSM -lICE
> -lXext -lX11 -lXt -lSM -lICE -lXext -lX11 -lXpm -lm
> score.o(.text+0x225): undefined reference to `_XGetHostname'
> collect2: ld returned 1 exit status
> make: *** [xtetris.exe] Error 1
>
OK, XGetHostname supposed to be libX11.a, but it is not. I will
provide a fix by the mid of next week.
Sorry for troubles.
Suhaib
> Looking at this, I see some libraries included twice. And
> the second to last, Xpm, I added to get past xpm related link errors.
>
> Thanks.
>
> Suhaib Siddiqi wrote:
> >
> > Do yu care to post the out put of compile link error messages.
> > If it is tetris issue, I may not be able to help you but
> > will do my best to help you if the link time errors were due to
> > Cygwin/XFree86,
> > which I doubt.
> >
> > However without seeing what kind of errors you are getting, I cannot
> > be of any help to you.
> >
> > Suhaib
> >
> > > -----Original Message-----
> > > From: Bob McGowan [mailto:rmcgowan@veritas.com]
> > > Sent: Thursday, February 15, 2001 8:24 PM
> > > To: XFree86, Cygwin
> > > Subject: help with link error: undefined reference to XGetHostname
> > >
> > >
> > > I had several other link errors which I have successfully
> > > fixed, based on searching the list archive. But I cannot
> > > find any reference in the archives to this routine. I
> > > also did ran nm on the X11 lib files and did not find it.
> > > I'm trying to compile Xtetris, if that helps.
> > >
> > > What am I missing?
> > >
> > > Thanks,
> > >
> > > --
> > > Bob McGowan
> > > Staff Software Quality Engineer
> > > VERITAS Software
> > > rmcgowan@veritas.com
> > >
>
> --
> Bob McGowan
> Staff Software Quality Engineer
> VERITAS Software
> rmcgowan@veritas.com
>