On 3/20/2014 2:17 AM, Nat Goodspeed wrote:
On Mar 19, 2014, at 8:04 PM, Michael Marcin
wrote: I'm trying to use
BOOST_LOG_GLOBAL_LOGGER_DEFAULT( my_logger, boost::log::sources::severity_logger_mtboost::log::trivial::severity_level )
In a dll but it doesn't appear to be getting initialized.
The first BOOST_LOG_SEV results in a crash due to core being null.
How do I initialize a global logger in a DLL?
Is it a "managed" DLL?
This may no longer be relevant - but some years ago I was astonished (you might even say outraged) to discover that a "managed" DLL did not guarantee to initialize static "unmanaged" objects. I wondered how this could be called C++, since to me construction and destruction is one of the fundamental promises of the language.
Apologies if this is completely irrelevant to your problem.
Unfortunately it is not managed, but thanks for the tip in any event.