Boost logo

Boost-Build :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2002-12-17 09:29:00

As you all know, the order in which libraries are given to linker
matters on Linux. V1 gcc-tools.jam just repeats libraries twice.
Unfortunately, that does not work. If library a depends on b which depends on
c and you specify them in reverse order "c, b, a", then the linker will
still be unable to resolve references.

I see two approaches:

1. Order libraries appropriately. This probably not as hard in V2.
In fact, if library depends on some other library, it should specify


in requirements. We can use that information to sort libraries as passed
to linker.

2. Tell the linker to search libraries repeatedly. The syntax is

-( lib1.a lib2a -)

However, the man says:

Using this option has a significant performance cost. It is best to
use it only when there are unavoidable circular references between
two or more archives.

Does anybody know what "significant cost" means? Is that 10% or 10 times?
(In fast, I would conjecure that the cost should be very low -- the size of
symbol tables must be small, compared with all debug information).
(I'm gonna try that in practice, but don't know when)

- Volodya


Boost-Build list run by bdawes at, david.abrahams at, gregod at, cpdaniel at, john at