public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Re: Statically linking programs??
       [not found] <200103292359.f2TNx5e11276@mail.ee.gatech.edu>
@ 2001-03-29 17:53 ` Charles S. Wilson
  0 siblings, 0 replies; 4+ messages in thread
From: Charles S. Wilson @ 2001-03-29 17:53 UTC (permalink / raw)
  To: Mark Paulus; +Cc: cygwin

Mark Paulus wrote:
> 
> I was looking through the FAQ, and I see about an option to
> build binaries that link either the cygwin or the Micro$oft
> dlls.  However, I do not see an option to build statically linked
> binaries that require no dlls.  Is this a possibility??

Not under windows.  All windows programs require a runtime library of
some sort (like "glibc" on linux).  On the windows platform, all of the
available runtime libraries are dynamic libs (dlls).  This includes:
  msvcrt.dll  (microsoft runtime)
  crt.dll     (older microsoft runtime)
  cygwin1.dll (cygwin runtime)

> 
> (-static doesn't seem to have any effect:
> man gcc:
>        -static
>               On  systems that support dynamic linking, this pre-
>               vents linking with the shared libraries.  On  other
>               systems, this option has no effect.
> )

Incorrect.  "-static" causes the linker to *prefer* static libs over
dynamic libs, but if there is only a dynamic lib then the linker goes
ahead and uses it rather than bail out and fail.  In the case of runtime
libraries, there are only dll's -- so you will always dynamically link
to one of the runtimes.

--Chuck

--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Statically linking programs??
       [not found] <200103292359.SAA06845@delorie.com>
@ 2001-03-29 17:53 ` DJ Delorie
  0 siblings, 0 replies; 4+ messages in thread
From: DJ Delorie @ 2001-03-29 17:53 UTC (permalink / raw)
  To: commpg; +Cc: cygwin

> However, I do not see an option to build statically linked binaries
> that require no dlls.  Is this a possibility??

Not really.  A DLL is unlike a regular library, and neither
cygwin1.dll nor the MS dlls exist in non-dll form.

--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Statically linking programs??
       [not found] <200103292358.PAA20036@cygnus.com>
@ 2001-03-29 17:53 ` Christopher Faylor
  0 siblings, 0 replies; 4+ messages in thread
From: Christopher Faylor @ 2001-03-29 17:53 UTC (permalink / raw)
  To: cygwin

On Thu, Mar 29, 2001 at 09:57:55AM -0700, Mark Paulus wrote:
>I was looking through the FAQ, and I see about an option to 
>build binaries that link either the cygwin or the Micro$oft
>dlls.  However, I do not see an option to build statically linked
>binaries that require no dlls.  Is this a possibility??

No.

cgf

--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Statically linking programs??
@ 2001-03-29 11:48 Mark Paulus
  0 siblings, 0 replies; 4+ messages in thread
From: Mark Paulus @ 2001-03-29 11:48 UTC (permalink / raw)
  To: cygwin

I was looking through the FAQ, and I see about an option to 
build binaries that link either the cygwin or the Micro$oft
dlls.  However, I do not see an option to build statically linked
binaries that require no dlls.  Is this a possibility??

(-static doesn't seem to have any effect:
man gcc:
       -static
              On  systems that support dynamic linking, this pre-
              vents linking with the shared libraries.  On  other
              systems, this option has no effect.
)



--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2001-03-29 17:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <200103292359.f2TNx5e11276@mail.ee.gatech.edu>
2001-03-29 17:53 ` Statically linking programs?? Charles S. Wilson
     [not found] <200103292358.PAA20036@cygnus.com>
2001-03-29 17:53 ` Christopher Faylor
     [not found] <200103292359.SAA06845@delorie.com>
2001-03-29 17:53 ` DJ Delorie
2001-03-29 11:48 Mark Paulus

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).