From: henry.cheung@pwc.ca (Henry K. H. Cheung)
Subject: problem with windows gui program
25 Sep 1998 18:31:14 -0700
Message-ID: <199809251318.GAA07365.cygnus.gnu-win32@cygnus.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
To: GNU <gnu-win32@cygnus.com>

Hi:

I'm new to this.  How do you compile and link a windows program?  I've
this (simplew32.c):

#include <windows.h>
#include <stdio.h>

int STDCALL
WinMain (HINSTANCE hInst, HINSTANCE hPrev, LPSTR lpCmd, int nShow)
{
 char text[80];

  MessageBox (NULL, text, "Test", MB_OK);
  return 0;
}

and when I use bash this on NT4 (Cygnwin32 Beta 19) with
    'gcc -o simplew32.exe simplew32.c -lgdi32'

I got this:
c:\temp\cc0010481.o(.text+0x1c):simplew32.c: undefined reference to
'MessageBoxA@16'

Please help.

Thanks.

-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".
