From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12856 invoked by alias); 5 Jan 2002 19:38:39 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Received: (qmail 12804 invoked from network); 5 Jan 2002 19:38:32 -0000 Received: from unknown (HELO lsmls01.we.mediaone.net) (24.130.1.20) by sources.redhat.com with SMTP; 5 Jan 2002 19:38:32 -0000 Received: from neo (we-24-130-210-97.we.mediaone.net [24.130.210.97]) by lsmls01.we.mediaone.net (8.11.4/8.11.3) with SMTP id g05JZIp24588; Sat, 5 Jan 2002 11:35:18 -0800 (PST) Reply-To: "Jon Leichter" From: "Jon Leichter" To: "J. Henning Schwentner" Cc: Subject: RE: Compiling apps to Mingw32 with cygwin Date: Sat, 05 Jan 2002 11:38:00 -0000 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) In-Reply-To: <200201051541.KAA10021@irresistable.cnchost.com> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Importance: Normal X-SW-Source: 2002-01/txt/msg00207.txt.bz2 Hi Henning. You can use Cygwin's GCC. It's just a little more involved. Here's a short answer. When you configure, do so like this: $ env CC="gcc -mno-cygwin" ./configure --host=i386-pc-mingw32 Notice that your --host specification was a little off. The way that I have specified it is the standard way. If your configure script uses the format that you've specified then your format is correct. If your configure script uses Libtool, then the above method will not be sufficient. Libtool likes to strip the -mno-cygwin switch off at link time. For this, I use a wrapper script for MinGW. It's called mgcc, and it looks like this: $ cd /usr/bin $ cat > mgcc gcc -mno-cygwin $* ^D Now your configure line looks like this: $ env CC=mgcc ./configure --host=i386-pc-mingw32 There's one more GOTCHA. Cygwin GCC will look in /usr/lib no matter what. Thus if it finds a library in there that it doesn't find in /usr/lib/mingw, it will use it. That means when your configure script looks for a library that MinGW does not support, it believes that you do have it, and it will try to link it. Most of the time, MinGW does support the libraries that a configure script is looking for. So you may not have to worry about it. However, there is a workaround for this too. I wrote a detailed document on this topic, and it's posted on OpenLDAP's web site in their FAQ section: http://www.openldap.org/faq/data/cache/301.html It will explain how to fix the last GOTCHA as well... Jon > -----Original Message----- > From: cygwin-owner@cygwin.com [mailto:cygwin-owner@cygwin.com]On Behalf > Of J. Henning Schwentner > Sent: Saturday, January 05, 2002 7:42 AM > To: cygwin@cygwin.com > Subject: Compiling apps to Mingw32 with cygwin > > Hi, > > I am trying to compile SDL-1.2.3 for mingw32 with cygwin-1.3.6. > I use the following steps: > $ ./configure --host=pc-i386-mingw32 > # make > > It compiles without errors, but the outcoming SDL.dll has references to > cygwin1.dll not to MSVCRT.dll. > > I have also installed Mingw32-1.1. Do I have to use the gcc from the > mingw-distribution or can I use the cygwin-gcc? If I have to use the > mingw-gcc, how can I tell this to configure? > > Thanks in advance! > > Henning > > P.S: Please CC me, I am not on the list > > -- > J. Henning Schwentner > Lanthan Software KG > > _________________________________________________________ > Do You Yahoo!? > Get your free @yahoo.com address at http://mail.yahoo.com > > > -- > Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple > Bug reporting: http://cygwin.com/bugs.html > Documentation: http://cygwin.com/docs.html > FAQ: http://cygwin.com/faq/ > -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/