Huge executable [message #156678] |
Mon, 24 October 2005 02:10 ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
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 #157822 is a reply to message #156678] |
Fri, 11 November 2005 21:48 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
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.
|
|
|
Powered by
FUDForum. Page generated in 0.03618 seconds