delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1999/03/05/20:35:09

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
Sender: cygwin-owner AT sourceware DOT cygnus DOT com
Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com
Message-ID: <36E09392.F58D9168@solutions2000.net>
Date: Fri, 05 Mar 1999 21:31:46 -0500
From: Nehru Juman <shadowcaster AT solutions2000 DOT net>
X-Mailer: Mozilla 4.04 [en] (Win95; I)
MIME-Version: 1.0
To: cygwin AT sourceware DOT cygnus DOT com
Subject: (Problem building program)

Hello Everybody,

    I've just installed MingW32 and have my path and files set up
properly but when I try and build the simple hello world program below
everything compiles fine but during the linking process I get the
following error message:

C:\WINDOWS\TEMP\cc8480511.o(.text+0x66):two.cc:undefined reference to
'MessageBoxA AT 16'

    Can anyone please tell me what I'm doing wrong.

// Hello World Program
#include <windows.h>
#include <iostream.h>



int PASCAL WinMain(HANDLE hInstance, HANDLE hPrevInstance, LPSTR
lpCmdLine, int nCmdShow)
{

   cout<<"Hey, I'm working."<<endl;
   MessageBox(NULL,(const char *)"Hello World",
   (const char *)"My first program", MB_OK);

   return TRUE;
}



--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com

- Raw text -


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