delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2008/10/03/14:20:39

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Date: Fri, 3 Oct 2008 14:19:47 -0400
From: Christopher Faylor <cgf-use-the-mailinglist-please AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: A dumb question about static libs ?
Message-ID: <20081003181947.GB4663@ednor.casa.cgf.cx>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <003f01c9258c$660320e0$4001a8c0 AT mycomputer>
MIME-Version: 1.0
In-Reply-To: <003f01c9258c$660320e0$4001a8c0@mycomputer>
User-Agent: Mutt/1.5.16 (2007-06-09)
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

On Fri, Oct 03, 2008 at 07:15:29PM -0000, John Emmas wrote:
> I'm sure this'll seem obvious to those of you who are more experienced
> with Cygwin than I am - but to me, it seems like a pretty reasonable
> question.....
>
> I understand that Cygwin isn't an emulator and therefore it can't run a
> standard Linux executable.  I also understand why a Linux shared object
> can't be used with Cygwin as if it was a DLL.
>
>But what about static libs?  I've noticed that if I use Cygwin's nm.exe
>I can list the contents of a Cygwin static lib.  However, it also
>happily lists the contents of a conventional Linux static lib.  So
>assuming (a) that the given Linux library was built for the right
>processor - and assuming (b) it's the right library for any associated
>header files, could it be used in building a Cygwin app?  Anyone ever
>tried this?

No, because it wouldn't work.  This has nothing to do with static vs.
dynamic.  While the format of a .a file may be similar that doesn't
equate to object file interoperability.  Cygwin's nm and ar commands
could theoretically read archives from a number of other operating
systems.  That doesn't mean that the objects that are in the archive
could be linked in.

cgf

--
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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019