Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com Message-ID: <3AC3DEFD.A3A2B2FB@ece.gatech.edu> Date: Thu, 29 Mar 2001 20:18:53 -0500 From: "Charles S. Wilson" X-Mailer: Mozilla 4.75 [en] (WinNT; U) X-Accept-Language: en MIME-Version: 1.0 To: Mark Paulus CC: "cygwin AT cygwin DOT com" Subject: Re: Statically linking programs?? References: <200103292359 DOT f2TNx5e11276 AT mail DOT ee DOT gatech DOT edu> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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