0

我正在使用 C++ DLL 项目。我尝试在那里使用简单的提升线程。这是源代码。这个运行时异常uploadThread = boost::thread(uploadFileThread);在行。任何想法?

Unhandled exception at 0x6fa1bd89 (Controller.dll) in UserInterfaces.exe: 0xC0000005: Access violation reading location 0xbaadf05d.

控制器.h

namespace controller{
class  CController {
public: 
boost::thread uploadThread;
}
}

控制器.cpp

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;
}
4

0 回答 0