public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: gvidaver <gordon.vidaver@ll.mit.edu>
To: cygwin@cygwin.com
Subject: Re: -static not working with gcc 4.3.4
Date: Thu, 03 Feb 2011 19:34:00 -0000	[thread overview]
Message-ID: <30838541.post@talk.nabble.com> (raw)
In-Reply-To: <20101018213923.GO6369@const.famille.thibault.fr>


It still requires the cygwin1.dll:

$ g++ -v
...
gcc version 4.5.0 (GCC)

$ g++ test.c -o test -static

$ ldd test.exe
        ...
        cygwin1.dll => /usr/bin/cygwin1.dll (0x61000000)
        ...

And apparently the only alternative is mingw, see:

http://cygwin.com/faq/faq-nochunks.html#faq.programming.static-linking
"it is not possible to statically link with a Cygwin library to obtain an
independent, self-contained executable. "

$ i686-w64-mingw32-g++ -v
...
gcc version 4.5.1 (GCC)

$ i686-w64-mingw32-g++ test.c -o test -static

$ ldd test.exe
        ntdll.dll => ... path to Windows dlls
        kernel32.dll => ... 
        KERNELBASE.dll => ...
        msvcrt.dll => ...

(I.e. no dependencies on anything besides system dlls.)


Samuel Thibault wrote:
> 
> Marco Atzeri, le Mon 18 Oct 2010 14:22:02 +0100, a écrit :
>> have you checked if 4.5 has the same problem ?
>> 
>> http://cygwin.com/ml/cygwin-announce/2010-08/msg00016.html
> 
> It doesn't have the problem any more.
> 
> Samuel
> 
> --
> Problem reports:       http://cygwin.com/problems.html
> FAQ:                   http://cygwin.com/faq/
> Documentation:         http://cygwin.com/docs.html
> Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
> 
> 
> 

-- 
View this message in context: http://old.nabble.com/-static-not-working-with-gcc-4.3.4-tp29981383p30838541.html
Sent from the Cygwin list mailing list archive at Nabble.com.


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

  reply	other threads:[~2011-02-03 19:34 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-17  7:02 Samuel Thibault
2010-10-17  8:15 ` R: " Marco Atzeri
2010-10-17 22:46   ` Samuel Thibault
2010-10-18 12:58 ` Nellis, Kenneth
2010-10-18 13:12   ` Samuel Thibault
2010-10-18 13:53     ` Marco Atzeri
2010-10-19  7:46       ` Samuel Thibault
2011-02-03 19:34         ` gvidaver [this message]
2011-02-03 19:48           ` marco atzeri
2011-02-03 21:21             ` gvidaver
2011-02-03 22:19               ` Christopher Faylor
2011-02-03 19:50           ` Charles Wilson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=30838541.post@talk.nabble.com \
    --to=gordon.vidaver@ll.mit.edu \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).