[Thread] Dll Plugin depending from boost thread

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

[Thread] Dll Plugin depending from boost thread

Keraval Yannick
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 ?