public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* newbie: Why Cygwin/Egcs compiled executable is so bloated
@ 1999-11-19 16:56 Luke Liu
  1999-11-19 18:25 ` Chris Faylor
  1999-11-30 23:39 ` Luke Liu
  0 siblings, 2 replies; 4+ messages in thread
From: Luke Liu @ 1999-11-19 16:56 UTC (permalink / raw)
  To: cygwin

I understand that it is not as easy to work with dll with cygwin as with
Visual C++ or Borland C++.  However, when I compiled the Hello world program
generated by Visual C++ 6.0 wizard with Cygwin B20.1, the executable was
530KB, meanwhile the mingw32 build was 315KB. Then I got the egcs2.95.2 and
after renaming old lib for mingw32 by watching the gcc include/lib search
path, I was able to reduce the executable of hello.exe with mingw32 to
173KB. The size with Cygwin remains > 500KB.

The compiler switch I used were
	gcc -Os -mwindows -v -mno-cygwin -e _mainCRTStartup
and 
	gcc -Os -mwindows -v -e _mainCRTStartup

respectively. Am I simply didn't enable the correct gcc switch? BTW, the
VC++6.0 compiled debug executable is 157KB and the released version should
be much smaller.
Thanks,

Luke

P.S. I found that due to some screwed security of something, I cannot post
to the solutioncentral from company. :-(((

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

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

* Re: newbie: Why Cygwin/Egcs compiled executable is so bloated
  1999-11-19 16:56 newbie: Why Cygwin/Egcs compiled executable is so bloated Luke Liu
@ 1999-11-19 18:25 ` Chris Faylor
  1999-11-30 23:39   ` Chris Faylor
  1999-11-30 23:39 ` Luke Liu
  1 sibling, 1 reply; 4+ messages in thread
From: Chris Faylor @ 1999-11-19 18:25 UTC (permalink / raw)
  To: Luke Liu; +Cc: cygwin

On Fri, Nov 19, 1999 at 06:57:48PM -0600, Luke Liu wrote:
>I understand that it is not as easy to work with dll with cygwin as with
>Visual C++ or Borland C++.  However, when I compiled the Hello world program
>generated by Visual C++ 6.0 wizard with Cygwin B20.1, the executable was
>530KB, meanwhile the mingw32 build was 315KB. Then I got the egcs2.95.2 and
>after renaming old lib for mingw32 by watching the gcc include/lib search
>path, I was able to reduce the executable of hello.exe with mingw32 to
>173KB. The size with Cygwin remains > 500KB.
>
>The compiler switch I used were
>	gcc -Os -mwindows -v -mno-cygwin -e _mainCRTStartup
>and 
>	gcc -Os -mwindows -v -e _mainCRTStartup
>
>respectively. Am I simply didn't enable the correct gcc switch? BTW, the
>VC++6.0 compiled debug executable is 157KB and the released version should
>be much smaller.
>Thanks,
>
>Luke
>
>P.S. I found that due to some screwed security of something, I cannot post
>to the solutioncentral from company. :-(((

Actually, you did post to solutioncentral three times. :-)

Here is my answer:

By default, gcc adds debugging information to every executable.  To
remove this you can either add a '-s' to the gcc command line or use the
strip command on the resulting executable:

strip file.exe

This should greatly reduce the size of the executable. 

cgf

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

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

* newbie: Why Cygwin/Egcs compiled executable is so bloated
  1999-11-19 16:56 newbie: Why Cygwin/Egcs compiled executable is so bloated Luke Liu
  1999-11-19 18:25 ` Chris Faylor
@ 1999-11-30 23:39 ` Luke Liu
  1 sibling, 0 replies; 4+ messages in thread
From: Luke Liu @ 1999-11-30 23:39 UTC (permalink / raw)
  To: cygwin

I understand that it is not as easy to work with dll with cygwin as with
Visual C++ or Borland C++.  However, when I compiled the Hello world program
generated by Visual C++ 6.0 wizard with Cygwin B20.1, the executable was
530KB, meanwhile the mingw32 build was 315KB. Then I got the egcs2.95.2 and
after renaming old lib for mingw32 by watching the gcc include/lib search
path, I was able to reduce the executable of hello.exe with mingw32 to
173KB. The size with Cygwin remains > 500KB.

The compiler switch I used were
	gcc -Os -mwindows -v -mno-cygwin -e _mainCRTStartup
and 
	gcc -Os -mwindows -v -e _mainCRTStartup

respectively. Am I simply didn't enable the correct gcc switch? BTW, the
VC++6.0 compiled debug executable is 157KB and the released version should
be much smaller.
Thanks,

Luke

P.S. I found that due to some screwed security of something, I cannot post
to the solutioncentral from company. :-(((

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

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

* Re: newbie: Why Cygwin/Egcs compiled executable is so bloated
  1999-11-19 18:25 ` Chris Faylor
@ 1999-11-30 23:39   ` Chris Faylor
  0 siblings, 0 replies; 4+ messages in thread
From: Chris Faylor @ 1999-11-30 23:39 UTC (permalink / raw)
  To: Luke Liu; +Cc: cygwin

On Fri, Nov 19, 1999 at 06:57:48PM -0600, Luke Liu wrote:
>I understand that it is not as easy to work with dll with cygwin as with
>Visual C++ or Borland C++.  However, when I compiled the Hello world program
>generated by Visual C++ 6.0 wizard with Cygwin B20.1, the executable was
>530KB, meanwhile the mingw32 build was 315KB. Then I got the egcs2.95.2 and
>after renaming old lib for mingw32 by watching the gcc include/lib search
>path, I was able to reduce the executable of hello.exe with mingw32 to
>173KB. The size with Cygwin remains > 500KB.
>
>The compiler switch I used were
>	gcc -Os -mwindows -v -mno-cygwin -e _mainCRTStartup
>and 
>	gcc -Os -mwindows -v -e _mainCRTStartup
>
>respectively. Am I simply didn't enable the correct gcc switch? BTW, the
>VC++6.0 compiled debug executable is 157KB and the released version should
>be much smaller.
>Thanks,
>
>Luke
>
>P.S. I found that due to some screwed security of something, I cannot post
>to the solutioncentral from company. :-(((

Actually, you did post to solutioncentral three times. :-)

Here is my answer:

By default, gcc adds debugging information to every executable.  To
remove this you can either add a '-s' to the gcc command line or use the
strip command on the resulting executable:

strip file.exe

This should greatly reduce the size of the executable. 

cgf

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

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

end of thread, other threads:[~1999-11-30 23:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-11-19 16:56 newbie: Why Cygwin/Egcs compiled executable is so bloated Luke Liu
1999-11-19 18:25 ` Chris Faylor
1999-11-30 23:39   ` Chris Faylor
1999-11-30 23:39 ` Luke Liu

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