delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/12/03/14:38:33

Message-Id: <1.5.4.32.19971203193727.006a9298@dce03.ipt.br>
Mime-Version: 1.0
Date: Wed, 03 Dec 1997 17:37:27 -0200
To: itriazon AT gte DOT net, djgpp AT delorie DOT com
From: Cesar Scarpini Rabak <csrabak AT dce03 DOT ipt DOT br>
Subject: Re: MSSDK question about RSXNTDJ

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019