-static not working with gcc 4.3.4
gvidaver
gordon.vidaver@ll.mit.edu
Thu Feb 3 21:21:00 GMT 2011
To clarify : you can't make an executable that copies the dll or library code
into the executable itself. When the exe launches it will look for
cygwin1.dll in /usr/bin. So it will fail to launch on a system that doesn't
have cygwin installed.
If I understand the cygwin license, this is intended as a way to help RedHat
make money from cygwin (this intent is fine by me) by forcing you to pay
them for a solution to this problem.
marco atzeri-4 wrote:
>
> On Thu, Feb 3, 2011 at 8:34 PM, gvidaver wrote:
>
> what is a new game to continue a thread after 3-4 months ?
>
>>
>> It still requires the cygwin1.dll:
>
> of course it is a cygwin program built by the gcc for cygwin .
>
>>
>> $ 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
>>
>>
>
> --
> 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-tp29981383p30839509.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
More information about the Cygwin
mailing list