Boost logo

Boost-Build :

From: Toon Knapen (toon.knapen_at_[hidden])
Date: 2004-08-18 09:00:20


altecrtcw wrote:

> I'd like to link to prebuilt .lib files located in different
> directories where the directories are determined by: the compiler
> version and runtime-link setting.
>
> For example, these are the 4 directories containing the prebuilt *.lib
> files I'd like to use within various projects:
>
> z:\src\lib\vc6\mtstatic - static .lib files for vc6 (prebuilt)
> z:\src\lib\vc6\mtshared - shared .lib files for vc6 (prebuilt)
> z:\src\lib\vc71\mtstatic - static .lib files for vc7 (prebuilt)
> z:\src\lib\vc71\mtshared - shared .lib files for vc7 (prebuilt)
>
> What is the correct syntax within my Jamfile at the project root to
> make this work? I tried to get this to work in "project :
> requirements" but have had no success.

I have tried to do it in the project target too but found no syntax to
do it. There is another option however (and it is documented).

To link with ATLAS (optimised BLAS libraries), I added to my
user-config.jam following:

<quote from user-config.jam>
import project ;
project.initialize $(__name__) ;
project user-config ;
lib blaslib : : <name>atlas <search>/usr/local/lib ;
</quote>

In my Jamfile I now write

<quote from Jamfile>
exe foo : bar.cpp /user-config//blaslib ;
</quote>

This should work IF you only have one library per prebuilt lib. Let me
explain: For linking with atlas, you actually need to link with three
libraries in a specific order: libf77blas.a, lilbcblas.a and libatlas.a.
Now with the above mechanism you can not associate multiple external
libraries with one prebuilt-library (blaslib) AFAICT ;-( Or is there ?

 


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