delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2006/12/13/10:34:43

X-Spam-Check-By: sourceware.org
Message-ID: <45801D69.8050204@cygwin.com>
Date: Wed, 13 Dec 2006 10:34:01 -0500
From: "Larry Hall (Cygwin)" <reply-to-list-only-lh AT cygwin DOT com>
Reply-To: cygwin AT cygwin DOT com
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.8) Gecko/20061108 Fedora/1.5.0.8-1.fc4.remi Thunderbird/1.5.0.8 Mnenhy/0.7.4.0
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: libraries
References: <195b3f1f0612130010r1ff74342sfc4a699380ee873d AT mail DOT gmail DOT com>
In-Reply-To: <195b3f1f0612130010r1ff74342sfc4a699380ee873d@mail.gmail.com>
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.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

Wynfield Henman wrote:
> I have managed to confuse myself regarding libraries under cygwin,
> after reading extensively on building dlls under cygwin.....
> 
> Please check if my understanding is correct.
> (1) For simple static libraries ld's output is fine.
>     Because only cygwin code will access it.
> 
> (2) Does this follow with *nix shared library format? (if only used by
> cygwin programs which
>    emulate *nix (does it also know about shared library objects)?
> 
> (3) The ms-dll shared library format is only necessary if we want
> ms-programs to be able to
>     use the program.
> 


There's no incompatibility of object format between Cygwin static libs
and those created by the MS compiler.  Ditto for DLLs.  There is no such
thing as shared libraries in the traditional UNIX sense on Windows.  The
only "incompatibilities" between Cygwin built libs/DLLs and MS's are:

   1. References to C++ in libs/DLLs built in one won't be resolved in the
      other (this is true when mixing and matching C++ object code from any
      compiler).  This is not a problem for C code.

   2. Calling Cygwin compiled code from a native executable needs some extra
      steps to make sure that the Cygwin C-runtime initialization code gets
      called.  The reverse situation is not generally a problem.

-- 
Larry Hall                              http://www.rfk.com
RFK Partners, Inc.                      (508) 893-9779 - RFK Office
216 Dalton Rd.                          (508) 893-9889 - FAX
Holliston, MA 01746

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