does FPC not remove unused code, variable and consts?
in my assembler/compiler, i have include 10,000 lines of code, and if my main file does nothing it will be the minimum exe size, why does FPC use 30kb that is ridiculous....
in ziron, even a messagebox app is 2kb
Code:
program WIN32GUI 'Test';
#include 'kernel32.zir';
#include 'user32.zir';
MessageBox(0, 'Hello World!', 'Hello', MB_OK);
ExitProcess(0);
I'd be interested in what FPU adds so much to the exe to be 30kb!!!!!!!! :O
the minimum size note on windows (PE) is 1kb, since you need 512 bytes for headers and 512 for your code.
Code:
program WIN32GUI 'Test';
#include 'kernel32.zir';
#include 'user32.zir';
#include 'strings.zir';
#include 'gdi32.zir';
function Unused1() {
#repeat 100000:
eax = eax; //useless code to make the exe huge :) (not really since it will be discarded)
#end
}
MessageBox(0, 'Hello World!', 'Hello', MB_OK);
ExitProcess(0);
this compiles with an equiv of 101873 lines of code and is still only 2kb, i can add error checking too which takes it to 3.5kb......
Bookmarks