Boost logo

Boost :

From: Boris (boriss_at_[hidden])
Date: 2008-04-24 11:00:43


On Thu, 24 Apr 2008 16:21:29 +0200, Boris <boriss_at_[hidden]> wrote:

> [...]error LNK2019: unresolved external symbol "class
> boost::shared_ptr<struct
> boost::logging::logger_impl> __cdecl
> boost::logging::find_log_by_name(struct
> boost::logging::default_log_manager &,class
> std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class
> std::allocator<wchar_t> > const &)"
> (?find_log_by_name_at_logging@boost@@YA?AV?$shared_ptr_at_Ulogger_impl_at_logging@boost@@@2_at_AAUdefault_log_manager_at_12@ABV?$basic_string@_WU?$char_traits@_W_at_std@@V?$allocator@_W_at_2@@std@@@Z)
> referenced in function "public: __thiscall
> boost::logging::logger::logger(class std::basic_string<wchar_t,struct
> std::char_traits<wchar_t>,class std::allocator<wchar_t> > const &)"
> (??0logger_at_logging@boost@@QAE_at_ABV?$basic_string@_WU?$char_traits@_W_at_std@@V?$allocator@_W_at_2@@std@@@Z)

The linker error is also a Unicode-related problem: As Boost.Log is not a
header-only library it's important to make sure that the library is built
with the Unicode configuration which is used later in the projects. By
default it seems like that Boost.Log is built for char-based strings. If
you create then a project in VC++ where wchar_t-based strings are used
you'll get a linker error. The obvious fix would be to make the library
header-only. Otherwise you need to go back and build a new version of
Boost.Log for every project you use a different string type in.

Boris


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