Boost logo

Boost :

Subject: [boost] [Log] Problem with Release mode build
From: Sivaram Kannan (siva.devel_at_[hidden])
Date: 2010-08-26 08:32:59


Hi,

I have been using boost log with two of my projects, one an VC++ 2008
exe and another a VC++ DLL. Boost log was working as expected in the
Debug mode. But when I compiled the projects in release mode, the
boost log with the exe is not logging anything on the file and the dll
is creating an access violation. Following is the call stack which is
throwing the error.

cnbc.dll!boost::log_mt_nt5::sources::basic_logger<wchar_t,boost::log_mt_nt5::sources::wseverity_logger_mt<int>,boost::log_mt_nt5::sources::multi_thread_model<boost::shared_mutex>
>::open_record_unlocked<boost::parameter::aux::tagged_argument<boost::log_mt_nt5::keywords::tag::severity,enum
severity const > >(const
boost::parameter::aux::tagged_argument<boost::log_mt_nt5::keywords::tag::severity,enum
severity const > & args={...}) Line 269 + 0x15 bytes C++
cnbc.dll!boost::log_mt_nt5::sources::basic_severity_logger<boost::log_mt_nt5::sources::basic_logger<wchar_t,boost::log_mt_nt5::sources::wseverity_logger_mt<int>,boost::log_mt_nt5::sources::multi_thread_model<boost::shared_mutex>
>,int>::open_record_unlocked<boost::parameter::aux::tagged_argument<boost::log_mt_nt5::keywords::tag::severity,enum
severity const > >(const
boost::parameter::aux::tagged_argument<boost::log_mt_nt5::keywords::tag::severity,enum
severity const > & args={...}) Line 226 + 0xc bytes C++
cnbc.dll!boost::log_mt_nt5::sources::basic_composite_logger<wchar_t,boost::log_mt_nt5::sources::wseverity_logger_mt<int>,boost::log_mt_nt5::sources::multi_thread_model<boost::shared_mutex>,boost::mpl::vector1<boost::log_mt_nt5::sources::severity<int>
> >::open_record<boost::parameter::aux::tagged_argument<boost::log_mt_nt5::keywords::tag::severity,enum
severity const > >(const
boost::parameter::aux::tagged_argument<boost::log_mt_nt5::keywords::tag::severity,enum
severity const > & args={...}) Line 509 + 0x14 bytes C++

I have compiled the boost in release mode and as shared. Following is
the command I used.
,
.\bjam.exe --with-log --with-filesystem --with-system --with-date_time
--with-thread --with-regex define=BOOST_ALL_DYN_LINK variant=release
link=shared stage

What am i doing wrong here??

Thanks,
Siva.

.


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