[CMake] Dealing with circular linker dependencies
Juan Sanchez
Juan.Sanchez at amd.com
Thu Oct 4 14:11:59 EDT 2007
Aside from rearchitecting your project. You need to place one library
on both sides of the other library in the arguments to the linker.
-l A -l B -l A
This assures that the linker can resolve all the needed symbols.
Juan
Tal Blum wrote:
> I have two c++ libraries each depending on the other which creates a
> circular linker dependency problem. Does anyone know how to solve this
> problem? If this is not possible to solve at the command-line level can
> someone tell me how I can write a ADD_CUSTOM_COMMAND or
> ADD_CUSTOM_TARGET that will collect all the object files into a new
> library and make my executable depend on that new library target.
>
>
>
> Thanks, Tal
>
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> CMake mailing list
> CMake at cmake.org
> http://www.cmake.org/mailman/listinfo/cmake
--
Juan Sanchez
Juan.Sanchez at amd.com
800-538-8450 Ext. 54395
512-602-4395
More information about the CMake
mailing list