Why is my 64bit executable almost 3x larger than my 32bit executable?

Viewed 136

I made a simple Hello World program with nothing but a Form and a Label that says "Hello World!". I build the project with C++ Builder, first as 64bit then as 32bit.

The 64bit executable is 8,568 KB. In contrast, the 32bit executable is only 2,979 KB.

Why?

For both projects, I disabled Link with runtime packages, Enable RTTI, Debug Information, and Link with Dynamic RTL.

Both projects are set to Release mode.

The version of C++ Builder is:

Embarcadero® C++Builder 10.3 Version 26.0.36039.7899
Update 3
1 Answers

C++ Builder had stripped the symbols from the 32bit .exe but not the 64bit one.

I ran strip helloworld.exe on my 64bit .exeand it reduced the filesize down from 8,568 KB to 6,358 KB.

This same command didn't affect the size of the 32bit .exe.

Related