Boost logo

Boost :

Subject: Re: [boost] [Boost.Build] Unexpected MSVC linker error
From: Sergey Zubkovsky (sergzub_at_[hidden])
Date: 2009-10-12 11:28:29


Vladimir Prus <vladimir <at> codesourcery.com> writes:

>
> Sergey Zubkovsky <sergzub <at> gmail.com> writes:
>
> >
> > Hi,
> >
> > I'm using bjam and VC++2008 Express Edition to build date_time library,
> > for example.
> > When I try to link it with my project I have the error:
> >
> > LINK : fatal error LNK1104: cannot open file
> > 'boost_date_time-vc90-mt-gd-1_40.lib'
> >
> > 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?

PS:
Vladimir, can I write to you in Russian? :)


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