Mailing-List: contact cygwin-help@sourceware.cygnus.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@sources.redhat.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@sources.redhat.com>
List-Help: <mailto:cygwin-help@sources.redhat.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@sources.redhat.com
Delivered-To: mailing list cygwin@sources.redhat.com
From: "Paul Garceau" <pgarceau@teleport.com>
Organization: New Dawn Productions
To: cygwin@cygwin.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 <pgarceau@teleport.com>
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

