This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

undefined reference to 'MessageBoxA@16'


Hi,

when compiling and linking:

#include <windows.h>
int STDCALL
WinMain (HINSTANCE hInst, HINSTANCE hPrev, LPSTR lpCmd, int nShow) 
{
     MessageBox(NULL, "Test message", "Test", MB_OK);
     return 0;
}

with
    C:\test> gcc wintest.c

I get the error message:

    C:\temp/cc0010001.o(.text+0x26):wintest.c: undefined reference to 
              'MessageBoxA@16'

Can anybody tell me what is wrong?

Thanks in advance

--Rolf

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]