NO

Author Topic: reduce file size  (Read 3854 times)

whatsup

  • Guest
reduce file size
« on: May 20, 2010, 08:17:47 AM »
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

Offline TimoVJL

  • Global Moderator
  • Member
  • *****
  • Posts: 2112
Re: reduce file size
« Reply #1 on: May 20, 2010, 09:05:11 AM »
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

  • Guest
Re: reduce file size
« Reply #2 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  msvcr70.dll (or something like this)
« Last Edit: May 20, 2010, 09:19:59 AM by whatsup »

Online AlexN

  • Global Moderator
  • Member
  • *****
  • Posts: 394
    • Alex's Link Sammlung
Re: reduce file size
« Reply #3 on: May 20, 2010, 10:20:07 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

  • Guest
Re: reduce file size
« Reply #4 on: May 20, 2010, 10:43:07 AM »
many thanks man, that helped.

Offline Vortex

  • Member
  • *
  • Posts: 862
    • http://www.vortex.masmcode.com
Re: reduce file size
« Reply #5 on: May 20, 2010, 10:18:32 PM »
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

  • Guest
Re: reduce file size
« Reply #6 on: May 29, 2010, 08:57:33 PM »
thank you very very very much sir.
this is exactly what i was looking for.