I am having trouble compiling a sample program from an online tutorial I am working on. It's an extremely simple program.
#include <windows.h>
int WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int)
{
MessageBox(NULL, "Hello world!", "Sample", MB_OK);
return 0;
}
I compile it using the following line as the tutorial said:
bcc32 -W -laa wintest.cpp
I get 4 errors, 1 for each input to WinMain:
Error E2287 wintest.cpp 3: Parameter 1 missing name in function WinMain
Error E2287 wintest.cpp 3: Parameter 2 missing name in function WinMain
Error E2287 wintest.cpp 3: Parameter 3 missing name in function WinMain
Error E2287 wintest.cpp 3: Parameter 4 missing name in function WinMain
I can't figure out what the problem is, because I am a complete newbie to windows programming and all of this is foreign to me.
By the way, when I run the program as a console proggy it works just fine. It's only when I use WinMain that it gets angry.
I appreciate your assistance in advance.