Boost logo

Boost-Build :

From: sijuju2001 (sjulier_at_[hidden])
Date: 2004-04-13 16:25:18


I was experimenting with the <find-library> command under bjam v1
3.1.9 and there appears to be an inconsistency in the way it operates
with a msvc-like compiler (TOOLS=msvc or TOOLS=vc7).

The problem seems to be the following:

1. Static libraries are built with the default "lib" extension.

2. However, <find-library> does not look for libraries which have a
lib* extension.

The problem can be illustrated by adapting the example in
tools/build/v1/example/lib_use:

======

subproject tools/build/v1/example/lib_use ;

lib simple
:
simple_lib.cpp
;

exe simple
:
simple.cpp
<lib>simple
;

stage .
:
<exe>simple
<lib>simple
;

exe simple2
:
simple.cpp
:
<library-path>.
<find-library>libsimple
;

exe simple3
:
simple.cpp
:
<library-path>.
<find-library>simple
;

stage .
:
<exe>simple2
<exe>simple3
;

======

Under msvc and vc7, <exe>simple and <exe>simple2 build but
<exe>simple3 does not because "simple.lib" cannot be found. Under
cygwin, <exe>simple and <exe>simple3 build, but <exe>simple2 will not
build because liblibsimple.a cannot be found.

Can you suggest what the "proper" way is to solve this? At the moment
the only thing I can think of doing is adding some kind of
LIBRARY_PREFIX whose value depends on the toolset type.

Cheers,

Simon Julier

 


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