delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/03/19/09:39:25

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: Fri, 19 Mar 2004 09:38:59 -0500 (EST)
From: Igor Pechtchanski <pechtcha AT cs DOT nyu DOT edu>
Reply-To: cygwin AT cygwin DOT com
To: Alex Vinokur <alexvn AT connect DOT to>
cc: cygwin AT cygwin DOT com
Subject: Re: help with gcc (a.exe & cygwin1.dll)
In-Reply-To: <c3e4ne$ma7$1@sea.gmane.org>
Message-ID: <Pine.GSO.4.56.0403190933500.24444@slinky.cs.nyu.edu>
References: <E27BD27C1B7D814E8A89B2EF56F6E96701241F40 AT svlexc04 DOT corp DOT netapp DOT com> <NUTMEGNRXd2y0z3WtE90000019b AT NUTMEG DOT CAM DOT ARTIMI DOT COM> <c3e4ne$ma7$1 AT sea DOT gmane DOT org>
MIME-Version: 1.0
X-Scanned-By: MIMEDefang 2.39
Note-from-DJ: This may be spam

Alex,

Please configure your mailer to not quote raw e-mail addresses in your
replies -- let's not make it easier for the spam harvesters.  More below.

On Fri, 19 Mar 2004, Alex Vinokur wrote:

> "Dave Korn" <dk<at>artimi<dot>com> wrote:
> >
> > > -----Original Message-----
> > > From: cygwin-owner On Behalf Of Neto, Antonio Jose Rodrigues
> > > Sent: 18 March 2004 13:51
> >
> > > After this gcc -o hello hello.c
> > >
> > > Now, I need to send this program to another person that don't
> > > have cygwin1.dll. So, they cannot execute the exe file
> > > without the dll.
> > >
> > > Is is possible to generate a exe file that don't needs the
> > > dll of cygwin?
> >
> > gcc -o hello -mno-cygwin hello.c
> >
> > [insert generic RTFF comment here]
>
> ------ foo.c ------
> #include <sys/utsname.h>
> int main ()
> {
> struct utsname u;
>   return 0;
> }
> -------------------
>
> $ gcc foo.c
>
> $ cygcheck a.exe
> Found: .\a.exe
> a.exe
>   C:\cygwin\bin\cygwin1.dll
>     C:\WINNT\System32\KERNEL32.dll
>       C:\WINNT\System32\NTDLL.DLL
>
>
> If we send the a.exe and cygwin1.dll to another person,

With sources, hopefully, as per the GPL...

> could he execute a.exe?

As long as cygwin1.dll is found (in the PATH).

> Where he should set cygwin1.dll ?

Technically -- anywhere in the PATH.  However, if you aren't the only one
sending them a cygwin1.dll, or if they have Cygwin installed, they'll have
problems with multiple copies of the DLL on their system.  You could
provide a script that attempts to detect cygwin1.dll in the PATH (although
that might raise some versioning issues).

It is, however, best to recommend that they install Cygwin themselves
before running your application.
HTH,
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha AT cs DOT nyu DOT edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor AT watson DOT ibm DOT com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski, Ph.D.
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"I have since come to realize that being between your mentor and his route
to the bathroom is a major career booster."  -- Patrick Naughton

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.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