delorie.com/archives/browse.cgi | search |
Mailing-List: | contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm |
List-Subscribe: | <mailto:cygwin-subscribe AT sources DOT redhat DOT com> |
List-Archive: | <http://sources.redhat.com/ml/cygwin/> |
List-Post: | <mailto:cygwin AT sources DOT redhat DOT com> |
List-Help: | <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs> |
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 <jsb AT fred DOT fcny DOT org> |
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
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |