Boost logo

Boost-Build :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2004-08-23 02:15:02

Hi Toon,

> The <threading>multi property will add '-pthread' to the command line
> (which will gcc to link with But now I also need to add
> a whole list of additional system libraries (that are needed for python)
> to the link-line: "-lnsl -ldl -lreadline -ltermcap -lpthread -lutil -lm
> -lg2c".
> In bjamv1 I did this using the find-library and library-path properties:
> <Jamfile>
> SYS_LIB_PATH = my_path ;
> SYS_LIBS = nsl dl readline termcap pthread util m g2c ;
> exe my_app : my_source.cpp
> : <library-path>$(SYS_LIB_PATH)
> <find-library>$(SYS_LIBS)
> Additionally I knew how to add an option to the linkline (if necessary
> even specifying the flag per compiler like the '--export-dynamic' above).
> Anyone knows how to add a list of external libraries and flags to the
> link line in bjamv2 ? Thanks a lot in advance!

I believe that with the current CVS, you can do this:

exe my_app : my_source.cpp :
[ lib nsl dl readline : : <search> $(SYS_LIB_PATH) ] ;

If you use all those libs everywhere, you might consider declaraing them

lib nsl : : <search>$(SYS_LIB_PATH) ;
exe my_app : my_source.cpp nsl ;



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