DJGPP still produces bulky exes!

This is a discussion on DJGPP still produces bulky exes! within the A Brief History of Cprogramming.com forums, part of the Community Boards category; Even after I use the -s switch in compiling my C++ code in DOS, a 2,500 byte .cpp file turns ...

  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
    ustuzou@sympatico.ca

  2. #2
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,499
    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
    ustuzou@sympatico.ca

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, 05:04 AM
  4. DJGPP assembly syntax ills...
    By VirtualAce in forum A Brief History of Cprogramming.com
    Replies: 5
    Last Post: 11-11-2001, 01:54 AM
  5. DJGPP help needed
    By dune911 in forum C++ Programming
    Replies: 6
    Last Post: 09-15-2001, 04:56 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21