On 7 Mar 2004 at 9:47, Claudiozm@aol.com wrote:
I compiled two versions of 'Hello World!', one in C and the other in Pascal in the ctgwin environment, as follows:
C source hello.c: int main() {printf("Hello World!\n");} command line: gcc hello.c -o helloc.exe
Pascal source: program Hello; begin writeln('Hello World!') end. command line: gpc hello.pas -o hellopas.exe
The sizes of the binaries I obtained were, respectively (copied from the DOS prompt dir command):
HELLOC EXE 11.296 bytes HELLOPAS EXE 283.531 bytes
Why the sizes of these files are so different?
This is a FAQ. The gpc executable is so big because the whole of the RTS (libgpc.a) has to be linked.
What must be done in order to obtain a hellopas.exe file of reasonable size?
Not much that you can do at the moment.
Best regards, The Chief -------- Prof. Abimbola A. Olowofoyeku (The African Chief) web: http://www.bigfoot.com/~african_chief/