Question

I receive an assertion in dllinit.cpp, when I try to use Boost.Log in one of my DLLs.

I have a tools.dll, which contains my logging facility and I tried to implement to logging stuff with Boost.Log. This tools.dll is referenced by another helper.dll and both DLLs are used in the application.

However, when I start the application, I get the ASSERT.

This happens with Boost 1.54 and (included) Boost.Log as well as with Boost 1.48 and Boost.Log 1.1.

I've digged through lots of mailing lists and old postings. What I understood so far, there's an issue with _pRawDllMain pointer in Boost.Thread, some suggested commenting it out in

#include <boost/thread/detail/tss_hooks.hpp>

but this leads to memory leaks? This thread said it would be fixed after 1.40, but I don't know, if this has been done. Dynamic linking to Boost as suggested here did not help.

Asking on boost-users did not help so far.

Any hints, what I should check?

EDIT: It's configured as standard DLL, but there's a dependecy on MFC100.dll, because I use the API from afxwin.h to get version information of applications.

Was it helpful?

Solution

So I removed the dependency on MFC100.dll (GetVersionInfo works without afxwin.h) in the tools.dll, so there was no dependency on MFC100.dll in the helper.dll anymore.

Finally none of my DLLs depend on MFC, so the ASSERT also disappeared. Thanks xMRi!

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top