Comparison of file sizes for a simple window program in ASM, PellesC, and Microsoft Visual C:

ASM: 2.00 KB
PellesC: 9.50 KB
Visual C: 25.0 KB

Is there anyway to reduce the file sizes of executables produced in C. Perhaps some linker options or somethin. :confused:
Posted on 2003-12-22 19:01:04 by evil__donkey
Posted on 2003-12-22 19:06:26 by Starless
It's been discussed on this board a lot of times.
Either you can use pietrek's libctiny, or you can refrain from using libc at all - and code just like with win32asm.
For the latter option, use linker settings "/ENTRY:myentrypoint /NODEFAULTLIB /FILEALIGN:512"
Posted on 2003-12-22 19:27:56 by f0dder
Let me grab this chance to shamelessly promote my little WCRT project, which is much like libctiny but offers a bit more of the crt to work with :grin:

http://www.ibsensoftware.com/download.html

I released it about a week after I started it, and haven't looked at it since, so there are probably some bugs in there .. but it works fairly well in the files I've tested it with :alright:
Posted on 2003-12-23 03:17:38 by Jibz
Hi evil_donkey,

The solution is easiy;you need to use small C run-time start code + merged sections(linker's /MERGE option)

For an example:

http://www.asmcommunity.net/board/showthread.php?s=&postid=101961.msg101961
Posted on 2003-12-23 04:51:54 by Vortex
nice lib Jibz.

but c ant link with polink

POLINK: fatal error: Corrupt library: '.\wcrt.lib'.
Posted on 2004-01-13 13:25:51 by vilik