Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Message-ID: <4017A382.6136C678@dessent.net>
Date: Wed, 28 Jan 2004 03:56:50 -0800
From: Brian Dessent <brian@dessent.net>
Organization: My own little world...
MIME-Version: 1.0
To: cygwin@cygwin.com
Subject: Re: Problem with DLLs and processes
References: <OFE433A7FD.578BD292-ON80256E28.00452205@db.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Spam-Report: -2.9/5.0 ---- Start SpamAssassin results * -4.9 BAYES_00 BODY: Bayesian spam probability is 0 to 1% *      [score: 0.0000] *  2.0 AWL AWL: Auto-whitelist adjustment ---- End SpamAssassin results
X-IsSubscribed: yes
Reply-To: cygwin@cygwin.com
Note-from-DJ: This may be spam

Przemyslaw Sliwa wrote:
> 
> Woooooww,
> 
> It seems it is much more complicated than just the simple STATIC option in GCC under Linux.
> But there must be a way to link the executable with the dlls. Like in Linux.

No, there really isn't a way.  You cannot compare the two situations
because they are not the same thing.  When you link against a dynamic
library under linux all you're doing is dynamically linking to functions
so that they can be called from your code.  But the Cygwin DLL provides
an entire POSIX emulation layer between your program and Windows.  This
means that when it starts up it does a number of initialization tasks,
including creating its own segment of shared memory, common to all
Cygwin apps, to maintain state information, tables of handles,
processes, etc.  In other words there's a lot of magic going on in the
background to provide you with that spiffy POSIX interface, and it's not
so simple as saying "Why can't I just link statically?"

Brian

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

