I'm using boost.log. Apart from the extreme amount of agro actually getting and building it, it's been running OK on Windows 7 and Vista.
I'm now trying to use the application on Windows XP, but boost.log is blowing with an unhandled exception (Access violaton reading location 0x00000000
).
This occurs in the method log:mt_nt5::sources::aux::set_severity_level
where it tries to set a static global variable named g_SeverityLevel
.
I found a document that suggested building with BOOST_LOG_NO_COMPILER_TLS
. I tried this, but it didn't work.
I read further into this, and the problem appears to be around the global variable being declared as __declspec(thread)
, which makes it thread static. This is only a problem with OSes prior to Vista.
I'm statically linking to boost.log, so I can't figure out why my pre-processor BOOST_LOG_NO_COMPILER_TLS
isn't being recognised.
Am I missing something?
Update:
No matter what I do when building the libs with bjam
, my BOOST_LOG_NO_COMPILER_TLS
flag isn't being recognised. I'm building like this:
bjam address-model=32 --toolset=msvc-10.0 --build-type=complete
--with-log variant=debug link=static runtime-link=static
define=BOOST_LOG_NO_COMPILER_TLS stage
I compared the contents of the output in the stage
folder after building with and without this flag, and the contents are identical!
So, a related question would probably now be: am I using the bjam command line correctly?