This is the mail archive of the
cygwin@cygwin.com
mailing list for the Cygwin project.
Re: How to build a static linked library
- To: Mirko Vogel <mirko_vogel at web dot de>
- Subject: Re: How to build a static linked library
- From: Charles Wilson <cwilson at ece dot gatech dot edu>
- Date: Fri, 10 Aug 2001 12:49:16 -0400
- CC: cygwin at cygwin dot com
- References: <01df01c121ba$1d86c610$37fe0280@is.cs.cmu.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/