This is the mail archive of the mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: How to build a static linked library

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.


Unsubscribe info:
Bug reporting:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]