Mail Archives: djgpp/1997/12/03/14:38:33
At 14:56 03/12/97 GMT, Stephen C. Ferguson wrote:
>Hi,
>
>Thanks for the quick response to my question. Since I don't need the
>additional files, then there is something else wrong with my setup. I am
>trying to compile the following program, which came from the RSXNTDJ READ.EXE
>file:
>
>int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,LPSTR
>lpCmdLine, int nCmdShow)
>{
> MessageBox (NULL, "Hello Win32", "First App", MB_OK);
> return 0;
>}
>
>I'm trying to compile this with the following command line:
>
>gcc -Zwin32 test.c -o test.exe
>
>But I get the following compile errors:
>
>test.c:1 parse error before 'WinMain'
>test.c:1 parse error before 'hInstance''
>test.c: In Function 'WinMain':
>test.c: 'NULL' undeclared (first use this function)
>test.c:3 (Each undeclared identifier is reported only once
>test.c:3 for each function it appears in.)
>test.c:3 'MB_OK' undeclared (first use this function)
>
You must include the windows.h file at the very start of test.c.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Cesar Scarpini Rabak E-mail: csrabak AT ipt DOT br
DME/ASC Phone: 55-11-268-3522 Ext.350
IPT - Instituto de Pesquisas Tecnologicas Fax: 55-11-268-5996
Av. Prof. Almeida Prado, 532. Sao Paulo - SP 05508-901 BRAZIL
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Raw text -