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 From: "Paul Garceau" Organization: New Dawn Productions To: cygwin AT cygwin DOT com Date: Wed, 27 Dec 2000 15:48:59 -0800 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Subject: Re: Static version of Cygwin DLL? Reply-to: Paul Garceau Message-ID: <3A4A0F6B.13682.39B062@localhost> In-reply-to: <000c01c07053$e52f4250$ab00000a@costa> X-mailer: Pegasus Mail for Win32 (v3.12c) Hi folks, On 27 Dec 2000, at 20:25, the Illustrious Andre Oliveira da Costa wrote: > Hi there, > > I need to build an executable using Cygwin (gcc, ld etc.), but I > need it not to depend on cygwin1.dll. I tried to link directly > with /usr/lib/libcygwin.a : > > gcc -static -o ../bin/test.exe ../obj/test.o -L/usr/lib -lcygwin > > but the resulting executable still requires the presence of > cygwin1.dll on the path. I've searched the archives, but did not > find anything closer than this: > > http://www.delorie.com/archives/browse.cgi?p=cygwin/1998/02/13/01 > :17:34 The only way to force Cygwin to not depend on cygwin1.dll is to set the -mno-cygwin switch in your compile line (eg gcc -c -ofoo.exe foo.c -mno-cygwin). By forcing the elimination of cygwin1.dll using -mno-cygwin, you can then do this: gcc -ofoo.exe foo.c -mno-cygwin -lcygwin The default paths already scan the usr/lib directory. It is the usr/lib directory that has the static version of cygwin (libcygwin.a). Peace, Paul G. Nothing real can be threatened. Nothing unreal exists. -- Want to unsubscribe from this list? Check out: http://cygwin.com/ml/#unsubscribe-simple