A link error in C++

Hello,

I have a question about using Visual Studio to compile c++ codes.
I created 3 projects: A, B and C. A and B were created as dynamic library, while C was created
as static library. There are 3 classes, with one defined in each project.

ClassA is defined in the project A:

ClassA
{
public
testA();
};

ClassB is defined in the project B.

ClassB: public ClassC
{
public:
testB();
};

ClassC is defined in the project C.
ClassC
{
public:
testC();

};


In Visual Studio, A has a dependency on B, and B has a dependency on C. But A doesn't have dependency on C.
Also the implementation of ClassA::testA is:
ClassA::testA ()
{
ClassB b;
b.testC();
}

When I build project A, I got a link error which complained external symbol of testC cann't be found.
How can I solve this issue without creating dependency between A and C?


Thanks
Last edited on
ClassC
{
public:
tsetC();

};

Might this be the problem?

-Albatross
Topic archived. No new replies allowed.