Boost logo

Boost-Build :

From: Andre Hentz (ahentz_at_[hidden])
Date: 2004-04-04 15:15:57


Vladimir Prus wrote:

> Hi Andre,
>
>
>>However on the command line, the libraries appear to be alphabetically
>>ordered. For example, for cygwin and gcc 3.3.1:
>> -ladvapi32 -lc -lcygwin -lgcc -lkernel32 -lshell32 -lstdc++ -luser32
>>
>>Can I control the ordering in any way?
>
>
> Using the CVS version, yes.
>
> lib cygwin : : <name>cygwin <use>gcc ;
> lib gcc : : <name>gcc ;
>

I'm afraid the <use> feature is not working for searched libs.
When I do:

lib lib1 : : <name>X <library>lib2 ;
lib lib2 : : <name>A ;

exe a : a.cpp lib1 lib2 ;

I get:
gcc -o a a.cpp -lA -lX

If I change the name of lib2 from A to Z:

lib lib1 : : <name>X <library>lib2 ;
lib lib2 : : <name>Z ;

exe a : a.cpp lib1 lib2 ;

I get:
gcc -o a a.cpp -lX -lZ

> should cause proper ordering between cygwin and gcc. Out of curiousity, order
> of which libraries is important for you?
>

I don't know exactly but the requirements seem to be:
kernel32 must come after gcc
pthread must come after gcc and stdc++
c must be at the end

Note that most of these is taken care by g++ itself, unless one needs
-nodefaultlibraries.

Why is that gcc.jam puts the dynamic libraries before the static ones?
Doing the opposite seems to work for me (although I haven't tested it
thoroughly).

Best,

Andre Hentz

 


Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk