Link problem

I have the following problem:

There are 3 static libraries, let's call them libA.a, libB.a and libC.a
Then I have designed a new static library libD.a, which links with A, B and C.
Up to now everything is ok.

Now I'm creating an application that needs D and so does A, B and C to be linked.

The problem is that one of the libraries (A) is not linked in the application or at least the code can not be resolved.

When compilink I use the -lA -lB -lC -lD

I have tried to extract all objects from A, B, C and D and create a new static library E with all objects. Then if I link only E everything works fine. But this is not the solution, I want to keep all four libraries in different files.

I thought it could be related with the order but I have tried to put -lD in the first place but I get the same problem... the linker can resolve correctly B and C but no A.

Any idea?

Thanks.
Topic archived. No new replies allowed.