Yes, CRT is C run time lib, can you please explain what is it all about?
Also, I've change the setting to use MT, but now I get different errors:
error LNK2001: unresolved external symbol __malloc_dbg
error LNK2019: unresolved external symbol __free_dbg referenced in function "void __cdecl operator delete(void *,struct std::_DebugHeapTag_t const &,char *,int)" (??3@YAXPAXABU_DebugHeapTag_t@std@@PADH@Z)
error LNK2019: unresolved external symbol __malloc_dbg referenced in function "void * __cdecl operator new(unsigned int,struct std::_DebugHeapTag_t const &,char *,int)" (??2@YAPAXIABU_DebugHeapTag_t@std@@PADH@Z)
fatal error LNK1120: 2 unresolved externals
Here is a sample of my code:
Code:
unsigned __stdcall myThread(void *params)
{
DWORD dwSemCount=0;
HANDLE hSemaphore;
hSemaphore = OpenSemaphore(SYNCHRONIZE | SEMAPHORE_MODIFY_STATE, 0, THREAD_SEMAPHORE);
WaitForSingleObject(hSemaphore, INFINITE);
// Do Something Here
ReleaseSemaphore(hSemaphore, 1, (long *)&dwSemCount);
CloseHandle(hSemaphore);
ExitThread(1);
return(1);
}
int main()
{
unsigned dwChildId;
_beginthreadex(NULL, 0, &myThread, NULL, 0, &dwChildId);
return(0);
}