我正在使用C ++ DLL项目。我试着在那里使用简单的boost线程。这是源代码。 uploadThread = boost::thread(uploadFileThread);
行的此运行时异常。有什么想法吗?
Unhandled exception at 0x6fa1bd89 (Controller.dll) in UserInterfaces.exe: 0xC0000005: Access violation reading location 0xbaadf05d.
namespace controller{
class CController {
public:
boost::thread uploadThread;
}
}
namespace controller{
static void uploadFileThread(){}
void CController::StartFileUpload(){
uploadThread = boost::thread(uploadFileThread);
uploadThread.join();
}
}
int main(){
controller::CController my_Controller;
my_Controller.StartFileUpload();
return 0;
}