Building GtkD app on Win32 results in 111 MiB file mostly from zeroes (compressed size - 324 KiB)

Marco Leise Marco.Leise at gmx.de
Thu Aug 4 01:44:00 PDT 2011


Am 04.08.2011, 11:07 Uhr, schrieb Denis Shelomovskij  
<verylonglogin.reg at gmail.com>:

> AFAIK GtkD is the only mature crossplatform GUI for D. So the question  
> is: 111 MiB *.exe file mostly from zeroes is good/acceptable? Is it a  
> bug or it's how dmd2+OPTLINK works? It looks like dmd1 hasn't this issue.
>
> Files (dmd 2.054 compiled) are here:
> http://deoma-cmd.ru/files/other/huge-build.zip

I don't know who helped me with a similar problem once, but in my case I  
was compiling code that contained classes with large static arrays. As I  
understood it, their .init blob was making up most of my file.
A GtkD application I wrote on Linux 32-bit varies in size (depending on  
compile/link options) from several 100 KB to a few MB. If noone else knows  
 from the top of their head what is happening, could you post your compile  
and link options including dmd.conf. That way someone on Windows is able  
to check and probably find differences in the setup. Also, what size are  
the compiled .o files before linking?

If the object files are small, but the executable are large I would  
suspect you compile against GtkD statically to avoid shipping Gtk and GtkD  
with your application.
Could you double check that the linker options for DMD1 and DMD2 stayed  
the same?


More information about the Digitalmars-d mailing list