Boost logo

Boost :

Subject: Re: [boost] [Boost.Build] Unexpected MSVC linker error
From: Sergey Zubkovsky (sergzub_at_[hidden])
Date: 2009-10-16 03:53:25


Vladimir Prus wrote:
> Sergey Zubkovsky wrote:
>
>
>>>> The bjam's command line options are : --layout=tagged toolset=msvc
>>>> The name of the genereated lib file is "boost_date_time-mt-gd.lib".
>>>> The error doesn't occur if the "--layout" option is "versioned" or
>>>> "system".
>>>>
>>> This error is expected when using the 'tagged' layout. autolink requires
>>> that you build Boost using 'versioned' layout. The fact that 'system' works
>>> is probably due to the fact that you have already build with 'versioned'
>>> layout, so have the libraries already.
>>>
>>> You can disabled autolinking using BOOST_ALL_NO_LIB macro set to 1.
>>>
>>> Does this answer your question?
>>>
>>> - Volodya
>>> ________________________________________
>>>
>> Thank you, Vladimir, for your answer!
>>
>>
>>> You can disabled autolinking using BOOST_ALL_NO_LIB macro set to 1.
>>>
>> Yes, this hint solves my problem.
>> And, you are right: 'system' is equal to 'tagged' in this context. It was my
>> inattention.
>> But, "expected" sounds some strange -- I simply change the command line option
>> (it's undocumented, unfortunately) and we have really unexpected linker error.
>> Maybe a conditional #pragma warning would be very useful in this case?
>>
>
> Unfortunately, when you build your project the compiler does not know how
> you have built Boost, so I don't think there's any way to emit warning when
> you have autolink disabled, but Boost is built with layout!=versioned.
>
> Or did you have something else in mind?
>
No, we need to emit a warning when autolink is _enabled_ in a user's
project and Boost is build with layout!=versioned.
But, you're right. In case when the Boost is build separately I don't
see an acceptable way to emit a warning too.
In the best way it would be very nice to add some macro definitions
that adapt the '#pragma option(lib, ...' accordantly to the '--layout='
value.
Also, it would be very useful (for novices like me) to have a mention
in the "boost/Jamroot" (--layout option) about BOOST_ALL_NO_LIB and
other macros that affect output names.
BTW, is there any such macros or other settings? Where can I read about it?

Thank you.
>
>> PS:
>> Vladimir, can I write to you in Russian? :)
>>
>
> Well, I do understand Russian, but I generally prefer to keep all public
> discussion on public lists. And, you might get prompter reply here, as
> quite a number of folks know the answer.
>
> - Volodya
>
>


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