Boost logo

Boost Users :

Subject: Re: [Boost-users] Cannot statically link to Boost.Filesystem
From: Vladimir Prus (vladimir_at_[hidden])
Date: 2008-09-04 00:38:51


Mat Marcus wrote:

> On Wed, Sep 3, 2008 at 1:28 PM, Steven Watanabe <watanabesj_at_[hidden]> wrote:
>> AMDG
>>
>> Mat Marcus wrote:
>>>
>>> Really? I thought that libary usage-requirements were supposed to
>>> solve that problem for static libs in boost build.
>>>
>>
>> Boost.Build usage-requrements don't help for direct invocations of g++
>
> Heh, sorry, didn't read the top of the thread. My remark came from
> similar errors that I get when using boost filesystem 1.36.0 with
> bjam. That is, shouldn't boost filesystem's Jamfile.v2 have a system
> usage-requirement?

I don't think so. Filesystem's Jamfile has this:

        lib boost_filesystem
            :
            $(SOURCES).cpp
            ../../system/build//boost_system

When building shared lib, depenendency of boost_system is embedded in the
created .so. When building static lib, usage requirements on boost_system
is added automatically, so any other Boost.Build target that uses boost_filesystem
will get boost_system as well, no explicit usage requirements necessary.

If this does not work, it's a bug -- but we have a test for this very behaviour
(library_chain.py), and it works for me on Linux.

- Volodya


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net