I don't know what's wrong with it?

CodeLite installation/troubleshooting forum
Alex Wang
CodeLite Enthusiast
Posts: 12
Joined: Tue Mar 09, 2010 4:22 pm
Genuine User: Yes
IDE Question: c++
Contact:

I don't know what's wrong with it?

Post by Alex Wang »

I don't know why,the compile tell me undefined reference to "WinMain@16"
The code fragment as following:
int WINAPI WinMain(HINSTANCE hinstance, HINSTANCE previnstance, PTSTR pszComdLine, int comdshow)
{
HWND hwnd = FindWindow(TEXT("#32770"), TEXT("Error Show"));
if (IsWindow(hwnd))
{
//An instance is already running, activate it and send it the new#
SendMessage(hwnd, ESM_POKECODEANDLOOKUP, _ttoi(pszComdLine), 0);
}
else
{
DialogBoxParam(hinstance, MAKEINTRESOURCE(IDD_ERRORSHOW), NULL, Dlg_Proc, _ttoi(pszComdLine));
}
return 0;
}