From: Boris (boriss_at_[hidden])
Date: 2008-04-24 10:21:29
On Thu, 24 Apr 2008 15:34:40 +0200, Boris <boriss_at_[hidden]> wrote:
> On Thu, 24 Apr 2008 01:19:24 +0200, Boris <boriss_at_[hidden]> wrote:
>> [...]* The linker is trying to find a library called
>> boost_log-vc90-mt-gd-1_34_1.lib while the filename is really
>> libboost_log-vc90-mt-gd-1_34_1.lib. I renamed the file but got then a
>> linker error (unresolved external symbol "...
>> boost::logging::find_log_by_name(...)"). My code consists only of
>> BOOST_DECLARE_LOG and BOOST_DEFINE_LOG though (thus I would expect I
>> make much wrong here :)?
> As far as I understand meanwhile the linker is trying to link against a
> DLL (that's why it's looking for boost_log-vc90-mt-gd-1_34_1.lib) but
> there has no DLL been built when I ran bjam. I'd prefer to link
> but would be happy if anyone could tell me how to invoke bjam to create a
> DLL for (Boost.)Log. I found the directory
> bin.v2\libs\log\build\msvc-9.0\debug\link-static\threading-multi but
> is no DLL indeed. Or doesn't (Boost.)Log create DLLs yet/currently?
After looking around in the source code of (Boost.)Log I found this:
#if defined(_DLL) || defined(_USRDLL)
If a DLL is created in Visual Studio _DLL or _USRDLL is defined by default
- which means the library is dynamically linked. As no DLL for (Boost.)Log
is created though linking obviously fails. After removing the code above
the library is statically linked. I get then the following linker error
but that's something I try to work on next:
error LNK2019: unresolved external symbol "class boost::shared_ptr<struct
std::allocator<wchar_t> > const &)"
referenced in function "public: __thiscall
std::char_traits<wchar_t>,class std::allocator<wchar_t> > const &)"