>AutoModeDlg.obj : error LNK2019: unresolved external symbol "unsigned int __cdecl MyThreadA(void *)" (?MyThreadA@@YAIPAX@Z) referenced in function "public: void __thiscall CAutoModeDlg::OnBnClickedButton3(void)" (?OnBnClickedButton3@CAutoModeDlg@@QAEXXZ) 1>AutoModeDlg.obj : error LNK2019: unresolved external symbol "unsigned int __cdecl MyThreadB(void *)" (?MyThreadB@@YAIPAX@Z) referenced in function "public: void __thiscall CAutoModeDlg::OnBnClickedButton4(void)" (?OnBnClickedButton4@CAutoModeDlg@@QAEXXZ) 1>C:\Users\Noldx\documents\visual studio 2010\Projects\2NDTASK\Debug\2NDTASK.exe : fatal error LNK1120: 2 unresolved externals
static UINT MyThreadA(LPVOID pParam); int a();
int C2ndary::a() { //command of thread return 0; }
CWinThread* thread1;
#include "2ndary.h" extern UINT MyThreadA(LPVOID pParam);//call back the static UINT MyThreadA(LPVOID //pParam) that i declared in the 2ndary.h // bla bla bla UINT C2ndary::MyThreadA(LPVOID pParam) { C2ndary* dialog; dialog=(C2ndary*)pParam; dialog->a(); return 1; } void CMaindlg::OnClickedButton1() { thread1=AfxBeginThread(MyThreadA,this); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)