delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/03/18/13:22:37

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
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: slinky.cs.nyu.edu: pechtcha owned process doing -bs
Date: Tue, 18 Mar 2003 13:22:26 -0500 (EST)
From: Igor Pechtchanski <pechtcha AT cs DOT nyu DOT edu>
Reply-To: cygwin AT cygwin DOT com
To: Tim Renner <l0ci AT hotmail DOT com>
cc: cygwin AT cygwin DOT com
Subject: Re: Building a .exe w/ no cygwin1.dll dependancy...
In-Reply-To: <F105eTxtfkdpczeyifM00002862@hotmail.com>
Message-ID: <Pine.GSO.4.44.0303181317400.561-100000@slinky.cs.nyu.edu>
Importance: Normal
MIME-Version: 1.0

On Tue, 18 Mar 2003, Tim Renner wrote:

> Does anybody know how to do this?  I've tried building my test program a
> couple different ways
>
> g++ -o pipetest pipetest.cc /usr/lib/libcygwin.a
> g++ -o pipetest pipetest.cc -lcygwin
>
> g++ -static -o pipetest pipetest.cc
> g++ -static -o pipetest pipetest.cc -lcygwin
>
> And no matter what, the resulting executable still depends on cygwin1.dll.
>
> I would very much prefer not to have to force a completely static build
> because I would like to allow the loading of shared libraries...  I just
> want the C-runtime library provided by cygwin to be statically linked so
> there is no dependancy on the .dll.  Here's my quick test program if anyone
> would like to play with it...
>
> Thanks,
> -Tim

Tim,

There is *no* static equivalent of cygwin1.dll, so you will not be able to
build your program that way.  You can try using the "-mno-cygwin" flag to
gcc (which will build a MinGW version of your program), but you should be
aware that MinGW lacks many POSIX features of Cygwin.  Also, any problems
resulting from using that flag should be reported to the MinGW mailing
list (see <http://mingw.org/> for details).
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha AT cs DOT nyu DOT edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor AT watson DOT ibm DOT com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

Oh, boy, virtual memory! Now I'm gonna make myself a really *big* RAMdisk!
  -- /usr/games/fortune


--
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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019