This is the mail archive of the
cygwin@cygwin.com
mailing list for the Cygwin project.
GCC : -static option does not generate statically linked executable
- From: T-FERNANDEZ at dassault-data-services dot fr
- To: cygwin at cygwin dot com
- Date: Wed, 5 Dec 2001 17:31:47 +0100
- Subject: GCC : -static option does not generate statically linked executable
Hi,
I am trying to generate an executable, using "gcc -static" option.
The generated file is dynamically linked! As if the "-static" option was
simply ignored.
The output of "cygcheck" is as follows :
Error: could not find libX11.dll
C:\cygwin\bin\cygwin1.dll
C:\WINNT\System32\KERNEL32.dll
C:\WINNT\System32\ntdll.dll
C:\cygwin\bin\cygtcl80.dll
C:\WINNT\System32\USER32.dll
C:\WINNT\System32\GDI32.dll
C:\WINNT\System32\ADVAPI32.dll
C:\WINNT\System32\RPCRT4.dll
C:\cygwin\bin\cygtk80.dll
C:\WINNT\System32\COMDLG32.DLL
C:\WINNT\System32\SHELL32.dll
C:\WINNT\System32\COMCTL32.dll
One can see that the X11 DLL library is not found : however, I use the
-static option of gcc, before the -lX11 stuff, as mentioned in the
documentation.
I expect the compiler to link against libX11.a, so what happens?
Any idea would be greatly appreciated,
Regards,
Thierry Fernandez
Note : I use Cygwin 1.3.6-1
--
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/