Hi,

I have two targets, call them A and B. They both link with a third, static library called C. C attempts to invoke a function which is defined by however links with C, i.e. either A or B.

This is not a problem as long as A and B are executables or shared libraries, but if A or B is a static library which in turn is linked into a shared object or executable (call it D), then the command becomes something like

    cc ... -o libD.so -lA -lC

since the method C calls in A is unknown by the linker when A is processed, it is discarded. Instead, I would need the command line to look like this:

    cc ... -o libD.so -lA -lC -lA

but how can I do this without explicitly causing A to depend on C?

--
/Jesper




_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to