This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project. See the Cygwin home page for more information.
[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index] [Subject Index] [Author Index] [Thread Index]

(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@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@sourceware.cygnus.com