Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com Date: Thu, 17 May 2001 16:32:36 -0400 From: Jim Baumbach Message-Id: <200105172032.QAA31961@fred.fcny.org> To: cygwin AT cygwin DOT com Subject: linking with Win32 API I'm trying to link to MessageBox which is in User32, or so says http://msdn.microsoft.com/library/psdk/winui/dlgboxes_76bc.htm But though it appears to find the library, it gives me an undefined reference: $ gcc -otest3 c:/temp/test3.c -luser32 /cygdrive/c/temp/cck6598G.o(.text+0x2e):test3.c: undefined reference to `MessageBox' collect2: ld returned 1 exit status Message 1/584 From cygwin-digest-return- AT sources DOT redhat DOT com Page 6 The FAQ also suggested -mwindows which got me: $ gcc -mwindows -otest3 test3.c /usr/lib/gcc-lib/i686-pc-cygwin/2.95.2-6/../../../../i686-pc-cygwin/bin/ld: warn ing: cannot find entry symbol _WinMainCRTStartup; defaulting to 00401000 /cygdrive/c/temp/ccobP98G.o(.text+0x2e):test3.c: undefined reference to `MessageBox' collect2: ld returned 1 exit status What am I doing wrong? -jim -- Want to unsubscribe from this list? Check out: http://cygwin.com/ml/#unsubscribe-simple