This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Problems linking c++ class libraries
- From: "Mark L. Wise" <mark at alpha2 dot com>
- To: <gcc-help at gcc dot gnu dot org>
- Date: Sun, 24 Aug 2003 15:16:36 -0400
- Subject: Problems linking c++ class libraries
- Reply-to: <mark at alpha2 dot com>
Hello all!
I am relatively new to c++ and I have a question regarding linking class
libraries.
I have a "main line" program that calls a class out of a library (A) that I
built. This class library also calls classes out of another library (B).
When I try to link I get an unresolved call to <the class name> class
(library B) that I call in library "A".
HOWEVER, If I include a "dummy" call in my "mainline" program to the class
in library "B", then the link from library "A" completes to library "B" and
the program runs.
Why do I have to include a reference call to the class in library "B" in my
mainline program to get it the linker to resolve the link?
Thanks in advance for any advice!!
Mark