Help, zillions of undefined references
Eric Evans
eje4@cornell.edu
Fri Mar 5 14:29:00 GMT 2004
Hi Lyle et al,
Thanks so much for your message and your suggestion. I tried as you
suggested and unfortunately I still get a lot of undefined reference
errors, although different ones than the ones I get when I'm using gcc 2.96.
The programmer told me that I should use gcc 2.96 in order to ensure that
it links in the jpeg libraries that are needed by the program. But
unfortunately, although using 2.96 does cause the jpeg libraries to be
linked in properly, it also results in many dozens of other undefined
reference errors.
Is there some way of finding out what specific library files these missing
functions belong to? I would think that these missing functions, since the
programmer himself has no knowledge of them and is not explicitly invoking
them in his program code, must be some common system functions that perform
some kind of basic system operations and so they ought to well-known to
somebody, somewhere out there! If anyone has any thoughts on this problem,
I would appreciate hearing them. Thanks very much.
Eric
>It looks like you're actually using GCC 2.96 (since your command is
>g++296). Try changing CC and CXX in your Makefile to be gcc and g++,
>respectively. That should get you using the right compiler that came
>with the system. You're probably actually just using a version of GCC
>added to the system for backward compatibility.
>
>Cheers,
>Lyle
>
>-----Original Message-----
>From: gcc-help-owner@gcc.gnu.org [mailto:gcc-help-owner@gcc.gnu.org] On
>Behalf Of Eric Evans
>Sent: Thursday, March 04, 2004 2:18 PM
>To: gcc-help@gcc.gnu.org
>Subject: Re: Help, zillions of undefined references
>
>
> > > I have a problem with a make I'm trying to do that is resulting in
> > > lots and lots of undefined reference errors (see excerpt from error
> > > output at end of message). The programmer who wrote the program has
> > > no idea why all the functions are not being linked in. He says it
> > > ought to work, and he's basically washed his hands of the thing and
> > > tells me that it is up to me to deal with the problem. In my web
> > > searching I came across a message from a guy who said that the
> > > __gxx_personality_v0 reference error could be fixed by using
>LD=$(CXX)
> > > in the Makefile, but I tried that and it didn't work. I am using
>gcc
> > > 3.2.2 on RH linux version 9. I'm using the default make program
>that
> > > comes with RH 9. Is this a problem that could be fixed by switching
> > > to a different version of gcc or a different version of make? Is
> > > there some linker option in the Makefile that I need to set in order
> > > to get this thing to work? Unfortunately I have little knowledge of
> > > gcc and make. Any advice I could get on how to proceed to
> > > troubleshoot this problem would be greatly appreciated. Thanks very
> > > much.
> >
> >Start by posting the exact command line which causes the error.
>
>OK, here it is:
>/usr/bin/g++296 -o tsnake -g -L/usr/local/tsnake_new/lib
>-L/usr/X11R6/lib
> main.o xwindow.o make_pulldown.o snaxel.o
>contour.o tsnake.o dymprog.o io.o image.o lmesqCC.o
>fileDialogs.o InterestingArea.o parameterDialogs.o
>minimization.o bSpline.o cutting.o liblimin.a -ltiff -lm -lXm -lXt
>-lX11
>
>If anybody has any ideas about how I should proceed to try to eliminate
>all
>these undefined references, I'd appreciate hearing them. Thanks very
>much.
>
>Eric
More information about the Gcc-help
mailing list