Boost logo

Boost-Build :

Subject: [Boost-build] Linking Errors in Boost Logging
From: nsk_at_[hidden]
Date: 2009-12-28 18:17:23


Hi,

I am a beginner in using the Boost Libraries. I came across
them when I was trying to implement the Boost Logging
Framework version2 from John Torjo's website. I tried
implementing the starter
project(http://torjo.com/log2/doc/html/starter_project.html)
from Boost Log documentation using Visual Studios 2005 IDE. I
got the following 2 errors:

error C2440: '<function-style-cast>' : cannot convert from
'const char [13]' to 'boost::logging::formatter::tag::time'

and

error C2780: 'void
boost::logging::writer::format_write<formatter_base,destinatio
n_base,lock_resource,apply_format_and_write,router_type,format
ter_array,destination_array>::add_formatter(formatter,const
boost::logging::char_type *)' : expects 2 arguments - 1
provided

So, I commented the formatter::tag::time line assuming that I
don't need time to be displayed for the time being. The
program complied properly but it gave me link errors:

error LNK2019: unresolved external symbol "struct
boost::logging::filter::use_tss_with_cache<10> * __cdecl
g_l_filter(void)" (?g_l_filter@@YAPAU?
$use_tss_with_cache@$09_at_filter@logging_at_boost@@XZ) referenced
in function "void __cdecl `anonymous namespace'::`dynamic
initializer for
'ensure_log_is_created_before_maing_l_filter''(void)" (??
__Eensure_log_is_created_before_maing_l_filter@?
A0x6e6fd73c@@YAXXZ) my_app_log.obj

and

error LNK2019: unresolved external symbol _main referenced in
function ___tmainCRTStartup MSVCRTD.lib

Please let me know whether I am missing some linker
dependencies. Please help!

-Nik Kale

                


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