News:

Download Pelles C here: http://www.smorgasbordet.com/pellesc/

Main Menu

reduce file size

Started by whatsup, May 20, 2010, 08:17:47 AM

Previous topic - Next topic

whatsup

hay all,
my pocc argument are:
-W1 -Go -Ze -Zx -MT

so it uses a default library.

the minimum file size i'm getting is 18K
is there a way to use other lib and reduce exe file size ?

(without using upx ofcourse)

thanks in advanced

TimoVJL

What kind of program ?
Console or GUI ?

Is these needed ?
-MT multi-threading ?
-Go oldnames ?

Only programs with small amount code and without runtime-library can be small sized.
For example GUI program just using Win32-API functions.
May the source be with you

whatsup

#2
thanks for fast reply.
i found that when i set -MD
the size is as i expected 2k
even when i use runtime - printf
so can you just tell me which dll it uses ?
i guess that the standard of visual C  msvcr70.dll (or something like this)

AlexN

Quote from: whatsup on May 20, 2010, 09:13:46 AM
thanks for fast reply.
i found that when i set -MD
the size is as i expected 2k
even when i use runtime - printf
so can you just tell me which dll it uses ?
i guess that the standard of visual C  vc70.dll (or something like this)

It uses pocrt.dll, which is a part of Pelles C. You also can use msvcrt.dll, when you link with msvcrt.lib (this library is not included at version 6, but you can get it from version 5 of Pelles C). And this DLL is included in the most version of Windows.
best regards
Alex ;)

whatsup

many thanks man, that helped.

Vortex

You can use custom C run-time startup modules to reduce the .exe size. A GUI application can be 2 Kb with this method.

Tiny C run-time startup module for console applications
Code it... That's all...

whatsup

thank you very very very much sir.
this is exactly what i was looking for.