Boost logo

Boost :

Subject: [boost] [Thread] Dll Plugin depending from boost thread
From: Keraval Yannick (yannick.keraval_at_[hidden])
Date: 2012-03-05 07:34:04

Hi guys,

An application developed in my company uses the concept of "plugin" which
relies on the use of DLL (windows 7 box, Visual Studio 2005).
We are using Boost v 1.43 and when loading a plugin with a call to
LoadLibrary, application asserts with the following message

Debug Assertion Failed!
Program: C:\Windows\system32\regsvr32.exe
File: f:\dd\vctools\vc7libs\ship\atlmfc\src\mfc\dllinit.cpp
Line: 587
--> ASSERT(AfxGetModuleState() != AfxGetAppModuleState());

We could point out that this is due to the use of the boost thread library.

A quick google search pointed us to an issue in the Boost.Thread library
One proposed solution is to build a DLL instead of a static lib but this is
impossible in our company (only plugin can be compiled as dll).

We also try to update boost to V1.49 but the debug assertion is still

Is there another way to fix this ?

We could not find any ticket related to this problem (neither in the opened
tickets nor in the closed tickets), is this behavior considered as normal ?


View this message in context:
Sent from the Boost - Dev mailing list archive at

Boost list run by bdawes at, gregod at, cpdaniel at, john at