Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Huge executable
Huge executable [message #156678] Mon, 24 October 2005 02:10 Go to next message
Eclipse UserFriend
Originally posted by: pretzel_n_g.hotmail.com

Hi,

I'm using CDT 3.0.0 & Cygwin/gcc/g++ on WinXP.

I believe I'm trying to dynamically link to shared libraries... ie I've
checked Project Properties->C/C++ Build->GCC C++ Linker->Shared Library
Settings->Shared checkbox. The other fields on this page (eg. shared
object, import library name) are empty however.

When I look at the Modules panel whilst debugging I see that cygwin1.dll
is listed as well as a few others.

However, when I build my executable is 554KB. When I build a Release
version, it is around 440KB. I'm sure that it is to do with static
linking of libraries, because when I compare it with a significantly
more complex application build using MSVC++ dynamically linked to
libraries, the application is only 50KB.

Could anyone please give me some help on how to configure Eclipse CDT to
work with Cygwin/gcc to dynamically link to libraries properly please?

Thanks very much for your help.
PretzelX.
Re: Huge executable [message #157801 is a reply to message #156678] Fri, 11 November 2005 17:17 Go to previous messageGo to next message
Max is currently offline MaxFriend
Messages: 10
Registered: July 2009
Junior Member
Dear Pretzel,

I don't know if that also applies to cygwin:

http://www.mingw.org/mingwfaq.shtml#faq-C++size

hth

Max Berger

PretzelX wrote:
> Hi,
>
> I'm using CDT 3.0.0 & Cygwin/gcc/g++ on WinXP.
>
> I believe I'm trying to dynamically link to shared libraries... ie I've
> checked Project Properties->C/C++ Build->GCC C++ Linker->Shared Library
> Settings->Shared checkbox. The other fields on this page (eg. shared
> object, import library name) are empty however.
>
> When I look at the Modules panel whilst debugging I see that cygwin1.dll
> is listed as well as a few others.
>
> However, when I build my executable is 554KB. When I build a Release
> version, it is around 440KB. I'm sure that it is to do with static
> linking of libraries, because when I compare it with a significantly
> more complex application build using MSVC++ dynamically linked to
> libraries, the application is only 50KB.
>
> Could anyone please give me some help on how to configure Eclipse CDT to
> work with Cygwin/gcc to dynamically link to libraries properly please?
>
> Thanks very much for your help.
> PretzelX.
Re: Huge executable [message #157822 is a reply to message #156678] Fri, 11 November 2005 21:48 Go to previous message
Eclipse UserFriend
Originally posted by: radoslawg.xxxx.xx

PretzelX napisał(a):
> Hi,
>
> I'm using CDT 3.0.0 & Cygwin/gcc/g++ on WinXP.
>
> I believe I'm trying to dynamically link to shared libraries... ie I've
> checked Project Properties->C/C++ Build->GCC C++ Linker->Shared Library
> Settings->Shared checkbox. The other fields on this page (eg. shared
> object, import library name) are empty however.
>
> When I look at the Modules panel whilst debugging I see that cygwin1.dll
> is listed as well as a few others.
>
> However, when I build my executable is 554KB. When I build a Release
> version, it is around 440KB. I'm sure that it is to do with static
> linking of libraries, because when I compare it with a significantly
> more complex application build using MSVC++ dynamically linked to
> libraries, the application is only 50KB.

Not necessary. You can't really compare codes generated from different
compilers.
Anyway. First thing to do would be to strip the executable file (strip
<name_of_file> ). It should slim your exec a lot of kilobytes.
Also I would recommend browsing through gcc (g++) manual to find out
what other options you have when compiling/linkg C/C++ applications as
well as some general info about how gcc works.

Cheers,
Radek.
Previous Topic:Environment vars in Standard Make Project
Next Topic:newbie question on installation
Goto Forum:
  


Current Time: Mon Aug 26 05:16:18 GMT 2024

Powered by FUDForum. Page generated in 0.02814 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top