Thread: DJGPP still produces bulky exes!

  1. #1
    Registered User
    Join Date
    Feb 2002
    Posts
    16

    DJGPP still produces bulky exes!

    Even after I use the -s switch in compiling my C++ code in
    DOS, a 2,500 byte .cpp file turns into a 250,000 byte
    .exe. Any tips on reducing the size of the .exe beyond
    what Mr. Delorie suggests in his documentation?

    Miki
    [email protected]

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    Well if the author doesn't know, there's not much you can do

    Though it has to be said that C++ has a greater overhead than C (in the amount of run-time support).

    That is one of your tradeoffs - you trade nice OO code development against larger base executable sizes.

    If you were going for the smallest possible executable, you should have chosen assembler.

    You could pack it, using say
    http://upx.sourceforge.net/

  3. #3
    Registered User
    Join Date
    Feb 2002
    Posts
    16
    Thanks. The program compressed my 246,000-byte .exe to a
    90,000-byte .exe, and the program still works perfectly.
    Unfortunately, it will probably work only on a 32-bit
    system, since that is what the compressor is for.

    I'll still have another look at Delorie's other
    suggestions and study up on DJGPP to see what all the
    command line switches are.

    Miki
    [email protected]

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Wav edit programmation for dos with DJGPP
    By sprudhom in forum A Brief History of Cprogramming.com
    Replies: 1
    Last Post: 07-17-2003, 07:35 AM
  2. DJGPP project problems
    By VirtualAce in forum A Brief History of Cprogramming.com
    Replies: 4
    Last Post: 06-08-2002, 07:16 PM
  3. DJGPP V2.03 Refresh Beta (Win2k)
    By dune911 in forum C Programming
    Replies: 1
    Last Post: 12-27-2001, 06:04 AM
  4. DJGPP assembly syntax ills...
    By VirtualAce in forum A Brief History of Cprogramming.com
    Replies: 5
    Last Post: 11-11-2001, 02:54 AM
  5. DJGPP help needed
    By dune911 in forum C++ Programming
    Replies: 6
    Last Post: 09-15-2001, 04:56 PM