[filesystem, config (maybe) ] bug: static link with msvc8 fails

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[filesystem, config (maybe) ] bug: static link with msvc8 fails

Tobias Schwinger
When linking statically against Boost.Filesystem the (msvc) link step fails if
<boost/filesystem.hpp> was included by one of the source files.

Everything's works if
- compiling with GCC, or
- none of the source files includes boost/filesystem.hpp.

The link settings are

    <threading>multi <link>static <runtime-link>static

Here are the symptoms:

    boost_filesystem-vc80-mt-sd-1_34.lib

is built, but linking fails because

    ... cannot open file 'libboost_filesystem-vc80-mt-sgd-1_34.lib'

. Adding

    <runtime-debugging>off

to the link settings changes error message to

    ... cannot open file 'libboost_filesystem-vc80-mt-s-1_34.lib'


I'm using Boost.Build V2. There is an example project that shows the problem
attached to this post (note the path to Boost in 'project-root.jam' needs manual
adjustment).

I hope the report was of any help.

Regards,

Tobias


_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

hello.zip (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [filesystem, config (maybe) ] bug: static link with msvc8 fails

John Maddock
>> Everything's works if
>> - compiling with GCC, or
>> - none of the source files includes boost/filesystem.hpp.
>>
>> The link settings are
>>
>>    <threading>multi <link>static <runtime-link>static
>>
>> Here are the symptoms:
>>
>>    boost_filesystem-vc80-mt-sd-1_34.lib
>>
>> is built, but linking fails because
>>
>>    ... cannot open file 'libboost_filesystem-vc80-mt-sgd-1_34.lib'
>>
>> . Adding
>>
>>    <runtime-debugging>off
>>
>> to the link settings changes error message to
>>
>>    ... cannot open file 'libboost_filesystem-vc80-mt-s-1_34.lib'
>>
>>
>> I'm using Boost.Build V2. There is an example project that shows the
>> problem attached to this post (note the path to Boost in
>> 'project-root.jam' needs manual adjustment).

I believe this is a bug in bbv2: I complained about this a while back and
just got a message that it hadn't been implemented yet.  The problem is that
bbv2 is mangling the library filenames in a manner differently to bbv1, and
documented in our getting started guide.

You may want to turn autolinking off by defining BOOST_ALL_NO_LIB when
compiling until someone fixes this in bbv2.

John.

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Reply | Threaded
Open this post in threaded view
|

Re: [filesystem, config (maybe) ] bug: static link with msvc8 fails

Tobias Schwinger
John Maddock wrote:
> I believe this is a bug in bbv2: I complained about this a while back and
> just got a message that it hadn't been implemented yet.  The problem is that
> bbv2 is mangling the library filenames in a manner differently to bbv1, and
> documented in our getting started guide.
>
> You may want to turn autolinking off by defining BOOST_ALL_NO_LIB when
> compiling until someone fixes this in bbv2.
>

Thanks (and sorry for the late acknowledgement)!

--
Tobias

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost