Results 1 to 9 of 9

Thread: the smallest fpc program

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Quote Originally Posted by Colin View Post
    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....
    You forget that FPC has a lot of internals that needs initialization in a stock RTL. Multithreaded heap management, code page conversion tables for strings, wide string managers, thread managers, stack checking, command line parsing, virtual methods for TObject, etc
    Peregrinus, expectavi pedes meos in cymbalis
    Nullus norvegicorum sole urinat

  2. #2
    thanks for your help ,looks interesting now , MessageBox becomes 542b !! after compressing with upx and com
    Last edited by AirPas; 10-11-2011 at 07:46 AM.

  3. #3
    PGD Staff code_glitch's Avatar
    Join Date
    Oct 2009
    Location
    UK (England, the bigger bit)
    Posts
    933
    Blog Entries
    45
    Aside from a 30kb executeable being limited in functionality - UPX is a very good bet IMO. Although I admit I find 700kb ok and 70kb to be very small for me. You could always do some ASM8086 on linux - virtually no size at all.
    I once tried to change the world. But they wouldn't give me the source code. Damned evil cunning.

  4. #4
    Also read the FPC wiki page about EXE sizes: http://wiki.freepascal.org/Size_Matters

    Most importantly the "why bother?" bit.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •