Boost logo

Boost Users :

Subject: [Boost-users] issue about include boost thread header in MFC dll
From: young (yqin_99_at_[hidden])
Date: 2012-06-21 22:15:53


I have a MFC dll application. I try to use Boost thread in the dll.

#include "stdafx.h"
#include "interface.h"
#include "MFCDLL.h"

#include <boost/thread.hpp>

// The one and only CMFCDLLApp object
CMFCDLLApp theApp;

EXPORT32 int __stdcall func()
{
    AFX_MANAGE_STATE(AfxGetStaticModuleState());
    ...
    return DLL_OK;
}

The build is OK. But when I call the func, it crashes. If I comment the
line:
//#include <boost/thread.hpp>

Then it works well. So how to use thread in MFC dll?

--
View this message in context: http://boost.2283326.n4.nabble.com/issue-about-include-boost-thread-header-in-MFC-dll-tp4631663.html
Sent from the Boost - Users mailing list archive at Nabble.com.

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net