This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Problems linking c++ class libraries


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]