Boost logo

Boost :

From: Julio M. Merino Vidal (jmmv84_at_[hidden])
Date: 2006-07-15 07:10:57


Hello,

I have the following in a Jamfile.v2, which is part of a larger file
that declares a test-suite:

exe helpers
    : helpers.cpp
    : <library>../../../../boost//filesystem
# <define>BOOST_ALL_NO_LIB
# <define>BOOST_FILESYSTEM_STATIC_LINK
# <runtime-link>static <link>static
    ;

When I run 'bjam --v2 helpers' using the msvc toolset (version 8.0), I
get the following link error:

[... build of filesystem library stripped ...]
   Creating library
..\..\..\..\boost\bin.v2\libs\filesystem\build\msvc\debug\boost_filesystem-vc-gd-1_35.lib
and object ..\..\..\..\boost\bin.v2\libs\filesystem\build\msvc\debug\boost_filesystem-vc-gd-1_35.exp
msvc.link bin\msvc\debug\helpers.exe
LINK : fatal error LNK1104: cannot open file
'libboost_filesystem-vc80-mt-gd-1_35.lib'

Notice how the build is creating a 'boost_filesystem-vc-gd-1_35.lib'
file while the link of my utility is trying to use
'libboost_filesystem-vc80-mt-gd-1_35.lib'.

If I enable the commented-out lines in the exe rule, which were copied
from Boost.Filesystem's test suite, the link works. However, I bet
those are just hiding a real problem in Boost.Build (v2).

Shouldn't my rule work with dynamic libraries (i.e. without the static
linking "hack")? Am I doing something wrong? Or is this simply
working as expected and I should stick to static linking?

Thanks.

-- 
Julio M. Merino Vidal <jmmv84_at_[hidden]>
The Julipedia - http://julipedia.blogspot.com/

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk