Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com X-Authentication-Warning: argus.EECS.Berkeley.EDU: weimer owned process doing -bs Date: Tue, 16 Apr 2002 20:49:41 -0700 (PDT) From: Westley Weimer To: cygwin AT cygwin DOT com cc: weimer AT cs DOT berkeley DOT edu Subject: True Static Linking Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII I am using gcc under cygwin and I would like to ship hello.exe to a friend who does not have cygwin1.dll on his computer. $ gcc -v Reading specs from /usr/lib/gcc-lib/i686-pc-cygwin/2.95.3-5/specs gcc version 2.95.3-5 (cygwin special) $ gcc hello.c -o hello.exe -static Unfortunately, this does not work because cygwin1.dll is not present on the target computer. You can simulate the problem as follows: $ PATH= ./hello.exe [ Windows Error Box: The dynamic link library cygwin1.dll cannot be found in the path C:\WINNT ... ] I am willing to have "hello.exe" be fairly large, but shipping all of cygwin1.dll (700K) is not allowed. If this were linux I would pull all of the .o files out of cygwin1.a (or whatever) and link against a subset of them manually. I have no idea how to do this under cygwin. (1) Is there a "-static" switch that statically links in cygwin1.dll? (2) If not, how else can I solve this problem? Thanks! - Wes -- 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/