automake
[Top][All Lists]
Advanced

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

Re: Getting "undefined reference" errors during linking but I think I in


From: Rusty Ballinger
Subject: Re: Getting "undefined reference" errors during linking but I think I included all libraries?!?
Date: Thu, 1 May 2003 13:58:02 -0700

> I would appreciate any help finding reason for getting
> "undefined reference" errors during very last step
> of build process --- the linking to make executable.
> This seems to me to mean I'm not linking a necessary library.
> However, I have stared at the output and I can see
> all the -L's and -l's that should be there.

One question is what the undefined symbols are.  If you recognize them
as stuff you wrote, or as part of the thing you're building, then that
probably means your link line is missing one of the .o's.  With automake
this most likely means you left a source file out of foo_SOURCES?

If you think the symbols really are coming from a missing library, and
you think you have the library installed (as you probably do if you have
the headers corresponding to the library, which you probably would've
needed in order to compile .o's with references to those symbols), then
(if you don't have any better ideas) you can do something horrible like
nm -o /usr/lib/lib* | fgrep one_of_those_symbols to try to figure out
which library the missing symbols are coming from.  But most likely the
symbol names should give you a hint.  And there's probably an easier way
to do that anyway, ha ha.

--Rusty




reply via email to

[Prev in Thread] Current Thread [Next in Thread]