
On Thu, 24 Apr 2008 15:34:40 +0200, Boris <boriss@web.de> wrote:
On Thu, 24 Apr 2008 01:19:24 +0200, Boris <boriss@web.de> 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 can't 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 statically 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 there 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) #ifndef BOOST_LOG_DYN_LINK #define BOOST_LOG_DYN_LINK #endif #endif 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 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@logging@boost@@YA?AV?$shared_ptr@Ulogger_impl@logging@boost@@@2@AAUdefault_log_manager@12@ABV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@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@logging@boost@@QAE@ABV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@@Z) Boris