public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* RE: Static version of Cygwin DLL?
@ 2000-12-27 22:59 Pirot, Thierry
  2000-12-28 10:01 ` Andre Oliveira da Costa
  0 siblings, 1 reply; 9+ messages in thread
From: Pirot, Thierry @ 2000-12-27 22:59 UTC (permalink / raw)
  To: Cygwin

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1912 bytes --]

Maybe this could be an acceptable workaround: 
On Fri, Nov 24, 2000 at 02:26:49AM -0600, Pirot, Thierry wrote:
> http://www.xraylith.wisc.edu/~khan/software/gnu-win32/mno-cygwin-howto.txt
>
>hope this help,

I don't think it will.  This document tells you how to build an
application that does not rely on cygwin in any way.  Unless I'm missing
something, this is not what was being asked for.

The real answer is "You can't do that.  Sorry."

cgf

>-----Original Message-----
>From: Daniel Lidström [ mailto:danli97@ite.mh.se ]
>Sent: Thursday, 23 November, 2000 13:10
>To: cygwin@sources.redhat.com
>Subject: Statically linking cygwin1.dll
>
>
>Hi, how do I statically link cygwin1.dll into my executable?
>
>
>Daniel Lidström
>danli97@ite.mh.se
>www.ite.mh.se/~danli97/

-----Original Message-----
From: Andre Oliveira da Costa [ mailto:costa@cade.com.br ]
Sent: Wednesday, 27 December, 2000 23:25
To: Cygwin
Subject: Static version of Cygwin DLL?


Hi there,

I need to build an executable using Cygwin (gcc, ld etc.), but I need it not
to depend on cygwin1.dll. I tried to link directly with /usr/lib/libcygwin.a
:

gcc -static -o ../bin/test.exe ../obj/test.o  -L/usr/lib -lcygwin

but the resulting executable still requires the presence of cygwin1.dll on
the path. I've searched the archives, but did not find anything closer than
this:

http://www.delorie.com/archives/browse.cgi?p=cygwin/1998/02/13/01:17:34

it's too old, I thought maybe there could be something more up-to-date (I
tried Mumit's site as well, but it deals mainly with the problem of building
DLLs with Cygwin).

Any hints or directions to other documentation about this would be greatly
appreciated.

TIA.

Andre
--
André Oliveira da Costa


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

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

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

* RE: Static version of Cygwin DLL?
  2000-12-27 22:59 Static version of Cygwin DLL? Pirot, Thierry
@ 2000-12-28 10:01 ` Andre Oliveira da Costa
  0 siblings, 0 replies; 9+ messages in thread
From: Andre Oliveira da Costa @ 2000-12-28 10:01 UTC (permalink / raw)
  To: Cygwin

Hi everybody,

thanks for all the posts. Now I understand that, even if there was a
libcygwin1.a, linking statically to it could bring me licensing problems. I
also learnt that, if I'm ok with dropping POSIX, I could use the -mno-cygwin
switch (in this case, I'd be Cygwin license-compliant, right?). I guess that
covers it all.

Thank you all for your time.

Best,

Andre Costa

> Maybe this could be an acceptable workaround:
> On Fri, Nov 24, 2000 at 02:26:49AM -0600, Pirot, Thierry wrote:
> > http://www.xraylith.wisc.edu/~khan/software/gnu-win32/mno-cygwin-
> howto.txt
> >
> >hope this help,
>
> I don't think it will.  This document tells you how to build an
> application that does not rely on cygwin in any way.  Unless I'm missing
> something, this is not what was being asked for.
>
> The real answer is "You can't do that.  Sorry."
>
> cgf


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

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

* Re: Static version of Cygwin DLL?
  2000-12-27 15:59   ` DJ Delorie
@ 2000-12-28 16:44     ` Paul Garceau
  0 siblings, 0 replies; 9+ messages in thread
From: Paul Garceau @ 2000-12-28 16:44 UTC (permalink / raw)
  To: cygwin

I stand corrected.

On 27 Dec 2000, at 18:59, the Illustrious DJ Delorie wrote:

> 
> > 	By forcing the elimination of cygwin1.dll using -mno-cygwin,
> > you can then do this:
> > 
> > 	gcc -ofoo.exe foo.c -mno-cygwin -lcygwin
> > 
> > 	The default paths already scan the usr/lib directory.  It is
> > the usr/lib directory that has the static version of cygwin
> > (libcygwin.a).
> 
> I'm sorry, but this is completely wrong.  There is no static
> version of the cygwin runtime, period.  The -mno-cygwin option
> tells gcc to cross-compile to the MSVC runtime (i.e. the result
> is *not* a cygwin application).  What you *think* is the "static
> cygwin" is really just the import library for the DLL
> 




Nothing real can be threatened.
    Nothing unreal exists.

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

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

* Re: Static version of Cygwin DLL?
  2000-12-27 15:49 ` Paul Garceau
@ 2000-12-27 15:59   ` DJ Delorie
  2000-12-28 16:44     ` Paul Garceau
  0 siblings, 1 reply; 9+ messages in thread
From: DJ Delorie @ 2000-12-27 15:59 UTC (permalink / raw)
  To: pgarceau; +Cc: cygwin

> 	By forcing the elimination of cygwin1.dll using -mno-cygwin, 
> you can then do this:
> 
> 	gcc -ofoo.exe foo.c -mno-cygwin -lcygwin
> 
> 	The default paths already scan the usr/lib directory.  It is 
> the usr/lib directory that has the static version of cygwin 
> (libcygwin.a).

I'm sorry, but this is completely wrong.  There is no static version
of the cygwin runtime, period.  The -mno-cygwin option tells gcc to
cross-compile to the MSVC runtime (i.e. the result is *not* a cygwin
application).  What you *think* is the "static cygwin" is really just
the import library for the DLL

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

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

* Re: Static version of Cygwin DLL?
  2000-12-27 14:25 Andre Oliveira da Costa
  2000-12-27 14:41 ` DJ Delorie
@ 2000-12-27 15:49 ` Paul Garceau
  2000-12-27 15:59   ` DJ Delorie
  1 sibling, 1 reply; 9+ messages in thread
From: Paul Garceau @ 2000-12-27 15:49 UTC (permalink / raw)
  To: cygwin

Hi folks,

On 27 Dec 2000, at 20:25, the Illustrious Andre Oliveira da Costa wrote:

> Hi there,
> 
> I need to build an executable using Cygwin (gcc, ld etc.), but I
> need it not to depend on cygwin1.dll. I tried to link directly
> with /usr/lib/libcygwin.a :
> 
> gcc -static -o ../bin/test.exe ../obj/test.o  -L/usr/lib -lcygwin
> 
> but the resulting executable still requires the presence of
> cygwin1.dll on the path. I've searched the archives, but did not
> find anything closer than this:
> 
> http://www.delorie.com/archives/browse.cgi?p=cygwin/1998/02/13/01
> :17:34

	The only way to force Cygwin to not depend on cygwin1.dll is to 
set the -mno-cygwin switch in your compile line 
(eg gcc -c -ofoo.exe foo.c -mno-cygwin).

	By forcing the elimination of cygwin1.dll using -mno-cygwin, 
you can then do this:

	gcc -ofoo.exe foo.c -mno-cygwin -lcygwin

	The default paths already scan the usr/lib directory.  It is 
the usr/lib directory that has the static version of cygwin 
(libcygwin.a).

	Peace,

		Paul G.


Nothing real can be threatened.
    Nothing unreal exists.

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

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

* Re: Static version of Cygwin DLL?
  2000-12-27 14:41 ` DJ Delorie
  2000-12-27 14:48   ` Christopher Faylor
@ 2000-12-27 15:12   ` Earnie Boyd
  1 sibling, 0 replies; 9+ messages in thread
From: Earnie Boyd @ 2000-12-27 15:12 UTC (permalink / raw)
  To: DJ Delorie; +Cc: costa, cygwin

DJ Delorie wrote:
> 
> > I need to build an executable using Cygwin (gcc, ld etc.), but I need it not
> > to depend on cygwin1.dll.
> 
> You can't do that.
> 

Well, a static version of the Cygwin POSIX runtime can't be done; but,
if you only need ANSI and not POSIX -mno-cygwin will allow Cygwin1.dll
not to be used.

Cheers,
-- 
Earnie Boyd
mailto:earnie_boyd@yahoo.com

---         < http://earniesystems.safeshopper.com >         ---
--- Cygwin: POSIX on Windows < http://gw32.freeyellow.com/ > ---
---   Minimalist GNU for Windows < http://www.mingw.org/ >   ---

_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


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

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

* Re: Static version of Cygwin DLL?
  2000-12-27 14:41 ` DJ Delorie
@ 2000-12-27 14:48   ` Christopher Faylor
  2000-12-27 15:12   ` Earnie Boyd
  1 sibling, 0 replies; 9+ messages in thread
From: Christopher Faylor @ 2000-12-27 14:48 UTC (permalink / raw)
  To: cygwin

On Wed, Dec 27, 2000 at 05:41:18PM -0500, DJ Delorie wrote:
>
>> I need to build an executable using Cygwin (gcc, ld etc.), but I need it not
>> to depend on cygwin1.dll.
>
>You can't do that.

And, if you could, there would be potential licensing problems anyway.

cgf

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

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

* Re: Static version of Cygwin DLL?
  2000-12-27 14:25 Andre Oliveira da Costa
@ 2000-12-27 14:41 ` DJ Delorie
  2000-12-27 14:48   ` Christopher Faylor
  2000-12-27 15:12   ` Earnie Boyd
  2000-12-27 15:49 ` Paul Garceau
  1 sibling, 2 replies; 9+ messages in thread
From: DJ Delorie @ 2000-12-27 14:41 UTC (permalink / raw)
  To: costa; +Cc: cygwin

> I need to build an executable using Cygwin (gcc, ld etc.), but I need it not
> to depend on cygwin1.dll.

You can't do that.

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

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

* Static version of Cygwin DLL?
@ 2000-12-27 14:25 Andre Oliveira da Costa
  2000-12-27 14:41 ` DJ Delorie
  2000-12-27 15:49 ` Paul Garceau
  0 siblings, 2 replies; 9+ messages in thread
From: Andre Oliveira da Costa @ 2000-12-27 14:25 UTC (permalink / raw)
  To: Cygwin

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 861 bytes --]

Hi there,

I need to build an executable using Cygwin (gcc, ld etc.), but I need it not
to depend on cygwin1.dll. I tried to link directly with /usr/lib/libcygwin.a
:

gcc -static -o ../bin/test.exe ../obj/test.o  -L/usr/lib -lcygwin

but the resulting executable still requires the presence of cygwin1.dll on
the path. I've searched the archives, but did not find anything closer than
this:

http://www.delorie.com/archives/browse.cgi?p=cygwin/1998/02/13/01:17:34

it's too old, I thought maybe there could be something more up-to-date (I
tried Mumit's site as well, but it deals mainly with the problem of building
DLLs with Cygwin).

Any hints or directions to other documentation about this would be greatly
appreciated.

TIA.

Andre
--
André Oliveira da Costa


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

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

end of thread, other threads:[~2000-12-28 16:44 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-12-27 22:59 Static version of Cygwin DLL? Pirot, Thierry
2000-12-28 10:01 ` Andre Oliveira da Costa
  -- strict thread matches above, loose matches on Subject: below --
2000-12-27 14:25 Andre Oliveira da Costa
2000-12-27 14:41 ` DJ Delorie
2000-12-27 14:48   ` Christopher Faylor
2000-12-27 15:12   ` Earnie Boyd
2000-12-27 15:49 ` Paul Garceau
2000-12-27 15:59   ` DJ Delorie
2000-12-28 16:44     ` Paul Garceau

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).