static library and undefined reference

Iker Arizmendi
Fri Apr 9 03:28:00 GMT 2004

Just a quick follow up - when I put the static libraries
_after_ the executable's .o file I get _more_ undefined
reference errors.


Iker Arizmendi wrote:
> Hello all.
> I have a project that creates several static libraries
> in two directories and an executable that uses them in
> a third. The libraries build just fine, and the
> executable builds fine, but fails during linking with
> "undefined reference" errors. I've checked the libraries
> with nm and can see that the symbols the linker claims
> are undefined are exported (nm shows marks them with
> a "T"). I've checked that the link line includes the
> libraries and that libraries that are depended on by
> other libraries appear first (and before the executable's
> .o file). I also made sure that all the files involved
> were compiled with g++ and not gcc. But the errors persist.
> What am I missing here? Any help greatly appreciated.
> Regards,
> Iker

More information about the Gcc-help mailing list