Article View: borland.public.cppbuilder.nativeapi
Article #7937Re: Exe size and dynamic RTL
From: Ed Mulroy [TeamB]
Date: Thu, 09 Dec 2004 01:54
Date: Thu, 09 Dec 2004 01:54
64 lines
3119 bytes
3119 bytes
> 1) In case all my executables use dynamic RTL
> can I place the RTL dll in the same folder the
> exes are installed into instead of copying it to
> system32?
Yes, that should work.
> 2) I noticed that the RTL dll (cc3260.dll) is about
> 1.4 MB in size. That is more than all three files
> together when they each use static RTL. So it
> would actually not pay off to use dynamic RTL?
> Is there anything else I can do to keep at least
> the helper exe/dll small?
The RTL DLL must have everything in it, everything
you might use, not just those things you actually
do use.
You might try this:
tdump -em exename.exe >imports.txt
and look in the file to see what items your program
imports from the DLL.
Then make your own DLL which contains only those
items.
One thing you have not mentioned.
If this is pure Win32 API code and does not use new/delete
or classes then you don't need Runtime Type ID (RTTI) or
Exception Handling (EH). If so then add -RT- -x- to the
compiler options and add noeh32.lib to the library list
(if working form the command line, put it BEFORE the
cw*.lib rtl library). This should make your executables
even smaller.
. Ed
> nicolasr wrote in message
> news:41b7acc1@newsgroups.borland.com...
> Hi,
>
> I have one exe that uses a helper exe and a dll.
> Both the helper exe and the dll are written with
> plain WinApi because I want to keep them as
> small as possible.
> (The dll is for system hooking and the helper
> exe is placed in the autostart folder as a guard app).
>
> Now that I wanted to pack the three files to send
> them to a colleague I noticed that they are still
> quite large. I checked "Use dynamic RTL" in all
> three projects and the files are significiantly smaller
>
> 1) In case all my executables use dynamic RTL can
> I place the RTL dll in the same folder the exes are
> installed into instead of copying it to system32?
>
> 2) I noticed that the RTL dll (cc3260.dll) is about
> 1.4 MB in size. That is more than all three files
> together when they each use static RTL. So it
> would actually not pay off to use dynamic RTL?
> Is there anything else I can do to keep at least
> the helper exe/dll small?
Technical Details
Message-ID:
<41b7b156$3@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<41b7acc1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,bd0f78b0b8d3c0c1 X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Ed Mulroy [TeamB]" <dont_email_me@bitbuc.ket> Newsgroups: borland.public.cppbuilder.nativeapi References: <41b7acc1@newsgroups.borland.com> Subject: Re: Exe size and dynamic RTL Date: Wed, 8 Dec 2004 20:54:44 -0500 Lines: 67 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4807.1700 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4807.1700 NNTP-Posting-Host: 24.74.175.102 Message-ID: <41b7b156$3@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1102557526 24.74.175.102 (8 Dec 2004 17:58:46 -0800) X-Authenticated-User: edmulroy Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail