In eclipse I have done the below in windows platform with MinGW compiler - C_proj.exe--->links---->libB_proj.a----->links---->libA_proj.a
When linking A with B I am specifying only the path to libA_proj.a (not the lib name because that is not possible it seems!)
When making use of B inside C I had to specify both the libA_proj.a and libB_proj.a.
Codes -
//a.h class a { public: void printA(); }; //a.cpp void a::printA() { std::cout<<"This is 'a'"<<std::endl; } //b.h class b { public: void printB(); void printA(); }; //b.cpp void b::printB() { std::cout<<"This is 'B'"<<std::endl; } void b::printA() { std::cout<<"This is 'B'....calling A"<<std::endl; a objA; objA.printA(); } //c.cpp int main() { b objB; objB.printB(); objB.printA(); return 0; } Now my requirement is -- I don't want to link both B and A with C exe. Is there a way to link only B with C and get the work done so that I can provide only B and C exe to a third party?
.libis a thunk-library for a .dll