Boost logo

Boost Users :

Subject: Re: [Boost-users] Linking issue with Boost 1.44 and GCC 4.6
From: Joseph Sulewski (joemacher_at_[hidden])
Date: 2012-10-21 15:52:00


On Sun, Oct 21, 2012 at 3:44 PM, Lars Viklund <zao_at_[hidden]> wrote:

> On Sun, Oct 21, 2012 at 01:55:48PM -0400, Joseph Sulewski wrote:
> > Steven,
> >
> > Thank you for the reply. It is definitely something order related. I
> took
> > your advice and moved the boost_program_options to the end but now I get
> a
> > lot of different errors. Is there any documentation that guides the
> order
> > in which the boost libraries should be linked?
>
> Please do not top-post on the Boost lists.
>
> Linker command line ordering is largely due to historical reasons with
> ld-like linkers, and is considered a feature by some.
>
> In absence of the group options that changes scan behaviour, library
> resolution works roughly like this:
>
> The command line is scanned from left to right. Missing symbols are
> recorded as it scans. When something providing symbols is encountered,
> all missing symbols it can fulfil are filled and the rest are ignored.
>
> The end result is that if you list something that provides symbols too
> early on the command line, there's nothing that needs those symbols yet
> and they're all discarded.
>
> This is how traditional linking against static libraries work. Dynamic
> libraries are somewhat different, and newer toolchains have some changes
> in visiblity that may affect how links are performed.
>
> All in all, it's rarely wrong to play it safe and topologically sort
> your command line in dependency order.
>
> --
> Lars Viklund | zao_at_[hidden]
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>

Lars,

Thank you for the explanation The problem i'm facing is that I'm linking
against a third party library and I don't know their dependencies. Is there
a dependency order for the boost libraries?

Thanks



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net