delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/08/10/12:49:49

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Message-ID: <3B74108C.4090106@ece.gatech.edu>
Date: Fri, 10 Aug 2001 12:49:16 -0400
From: Charles Wilson <cwilson AT ece DOT gatech DOT edu>
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.2) Gecko/20010713
X-Accept-Language: en-us
MIME-Version: 1.0
To: Mirko Vogel <mirko_vogel AT web DOT de>
CC: cygwin AT cygwin DOT com
Subject: Re: How to build a static linked library
References: <01df01c121ba$1d86c610$37fe0280 AT is DOT cs DOT cmu DOT edu>

Mirko Vogel wrote:

> Hello,
> 
> when I tried to link my library with the -shared flag, the linker says, that
> _bss_end__, _bss_start__, _data_end__ and __data_start__ are not defined. As
> far as I understood the information I found in the mailing-list-archive,
> this is, since -shared has different meaning on Win32 and Unix/Linux: On
> Windows, it created a dynamic linked library and on Unix a static linked
> one.


Wrong.  -shared creates a shared library on both platforms (.so on unix, 
dll on windows)  [ it's a little more complicated than that on windows, 
but that's the basic idea ]

> 
> Now, I want to create a static linked library for Win32; How do I?

don't use -shared.  for that matter, don't "link" using gcc or ld.  Just 
as on unix, use "ar" to create an "archive" (static lib).  You are 
really asking very basic unix type "howto" questions, not 
cygwin-specific ones.  Please take them to a more appropriate venue.

--chuck


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.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