2013年8月9日星期五

[Boost] MFC dll problem using boost thread

 

project needs, used in MFC dll boost thread (), LoadLibraryEx when an assertion error, remove the thread library references disappear after assertion.

 

Baidu google after CSDN find an answer, first posted it:

 

{

 

boost :: thread + MFC DLL problem is basically the problem in boost 1.38 there, but I did not expect to boost 1.45 update does not solve the problem ... If you are using MFC development process, but also just created a MFC DLL project using boost :: thread, occurs compile run the program appear normal but an ASSERT. dllinit.cpp, Line: 587, ASSERT (AfxGetModuleState ()! = AfxGetAppModuleState ()); solution is to boost/libs/thread/src/win32/tss_pe.cpp in the bottom of the code comments off (ie, put the following code commented out the phrase.) extern BOOL (WINAPI * const _pRawDllMain) (HANDLE, DWORD, LPVOID) = & dll_callback; problems and re-compile boost solved.

 

}

 

original post: http://bbs.csdn.net/topics/330229744

没有评论:

发表评论