|
Boost-Build : |
Subject: Re: [Boost-build] Linker can't find library file
From: Vladimir Prus (ghost_at_[hidden])
Date: 2011-04-10 03:53:32
On Sunday, April 03, 2011 21:28:59 Dmitry Timoshenko wrote:
> Hello,
>
>
> I have a project being compiled with boost.build.
> Everything is fine except when compiling one of variants.
>
> I defined two new variants like this:
>
> variant debug-ssl : debug : <define>UNICOMM_SSL ;
> variant release-ssl : release : <define>UNICOMM_SSL ;
Do you mean to define different macros for those variants?
>
> There is a problem when the debug-ssl link=shared compiled.
>
> I also put the line
>
> <library>/boost/date_time//boost_date_time/<link>static
>
> into requirements part of argurments to the project rule in order to
> make boost.build to use static libraries to be linked.
>
> When debug-ssl is linked I get the error:
> cannot open file 'libboost_date_time-vc80-mt-gd-1_41.lib'
>
> The library is actually compiled and located in subdirectory
> ...../debug-ssl/..... but it has a little bit different name that
> differs only in one letter 'd'.
>
> The compiled name is 'libboost_date_time-vc80-mt-g-1_41.lib'.
>
> I found out that 'g' is debug runtime and 'd' is debug version of my
> code without NDEBUG defined.
>
> The 'pure' debug version (built with debug variant) has the letter 'd'.
>
> Where am I wrong? How to resolve this?
Please add
<define>BOOST_ALL_NO_LINK
to your project requirements, to disable autolinking. The autolinking is
supposed to help when you built Boost separately, and then use it in your
own projects, outside Boost.Build. The 'd' letter is added when the
variant is 'debug', and therefore is not added when the variant is 'debug-ssl'.
- Volodya
-- Vladimir Prus http://vladimir_prus.blogspot.com Boost.Build: http://boost.org/boost-build2
Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk