From: okapi AT ezonline DOT com (Matt Gulden) Newsgroups: comp.os.msdos.djgpp Subject: Re: EXE size Date: Thu, 08 May 1997 03:16:24 GMT Organization: Lines: 35 Distribution: world Message-ID: <5kr5sf$b47$1@news3.microserve.net> References: <5kokdm$seh$1 AT news3 DOT microserve DOT net> <5kpvk1$mc7 AT news DOT ox DOT ac DOT uk> Reply-To: okapi AT ezonline DOT com NNTP-Posting-Host: 206.228.74.149 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk mert0407 AT sable DOT ox DOT ac DOT uk (George Foot) wrote: >Matt Gulden (okapi AT ezonline DOT com) wrote: >: Hello, I am very new to DJGPP (downloaded it the other day) and I'm >: new to C/C++ but that isn't part of my problem... I noticed that when >: I compiled a small program of about 10 lines, the EXE file size was >: about 100k... all the program did was include iostream.h, and print >: "hello, earth" (nice break from Hello, World) >: Is there any way I can lessen the file size? >1) Put `-s' on the linking line (removes debugging info). >2) Compile larger programs; EXE size is not proportional to source size. >You can use `strip ' on an existing executable, which has the >same effect as (1). The point in (2) is that most of your program is >one-off startup code and library code, which only needs linking in once. >Adding more source lines won't make it link this stuff in again. Other >than that, the only reason I can think why EXE size could matter to you is >because of the disk space taken up; don't worry about the memory, because >parts which aren't used much will spend most of the time on disk. Thanks for your help... the EXE size kinda mattered cause I wanted to make small graphical demos and stuff... I guess I could just use Turbo C++ or something so not having to use DPMI and stuff like that... But I'll stop wasting bandwidth... thanks! >-- >George Foot >Merton College, Oxford -- Matt Gulden -- thrillhaus AT ezonline DOT com http://www.ezonline.com/okapi/