Mail Archives: djgpp/1998/06/18/03:36:14
On 17 Jun 1998, New6ie wrote:
>
> int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
> LPSTR lpCmdLine, int nCmdShow)
> {
> MessageBox (NULL, "Hello Win32", "First App", MB_OK);
> return 0;
> }
>
>
> I get the following errors:
>
> test.c:1: parse error before 'WinMain'
> test.c:1 parse error before 'hInstance'
> test.c: In function 'WinMain':
> test.c:6: 'NULL' undeclared (first use this function)
> test.c:6: (Each undeclared identifier is reported only once
> test.c:6: for each function it appears in.)
> test.c:6: 'MB_OK' undeclared (first use this function)
>
> Any help would be appreciated.
> -JayD.
>
You didn't #include "windows.h", that's why you got those errors.
Every windows program *must* have #include "windows.h"
Olivier.
- Raw text -