static library and undefined reference

Iker Arizmendi iker@research.att.com
Fri Apr 9 02:45:00 GMT 2004


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



-- 
Iker Arizmendi
AT&T Labs - Research
Speech and Image Processing Lab
e: iker@research.att.com
w: http://research.att.com




More information about the Gcc-help mailing list