[CMake] Bug in library link order?

Marcel Loose loose at astron.nl
Tue Mar 31 03:56:33 EDT 2009


Hi Denis,

That doesn't really matter. What *does* matter is that libraries appear
in "dependency order". I mean by that: if libA depends on libB, then
libB must appear after libA on the link line. But if libA does not
depend on, say libxml, than the order of these two libs is irrelevant.

Best regards,
Marcel Loose.


On Tue, 2009-03-31 at 00:45 -0700, Denis Scherbakov wrote:
> Dear CMake Community,
> 
> I have a project where there are:
> 
> LibraryA
> LibraryB (depends on LibraryA)
> Executable (depends on LibraryB and xml2)
> 
> during linking the order for link libraries is "LibraryB -lxml2 LibraryA". Should LibraryA (which is internal to the project) be specified before external libraries? 
> 
> Denis
> 
> 
> 
>       
> _______________________________________________
> 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



More information about the CMake mailing list