| delorie.com/archives/browse.cgi | search |
| From: | Jason Green <news AT jgreen4 DOT fsnet DOT co DOT uk> |
| Newsgroups: | comp.os.msdos.djgpp |
| Subject: | Re: EXE file size |
| Date: | Thu, 05 Oct 2000 00:02:39 +0100 |
| Organization: | Customer of Energis Squared |
| Lines: | 20 |
| Message-ID: | <bpcntsclvenao7tnpiqeu887qek2aa07pp@4ax.com> |
| References: | <8rg4fg$sm6$1 AT nntp DOT itservices DOT ubc DOT ca> |
| NNTP-Posting-Host: | modem-124.androderm.dialup.pol.co.uk |
| Mime-Version: | 1.0 |
| X-Trace: | news7.svr.pol.co.uk 970700644 4882 62.136.79.252 (4 Oct 2000 23:04:04 GMT) |
| NNTP-Posting-Date: | 4 Oct 2000 23:04:04 GMT |
| X-Complaints-To: | abuse AT theplanet DOT net |
| X-Newsreader: | Forte Agent 1.7/32.534 |
| To: | djgpp AT delorie DOT com |
| DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
| Reply-To: | djgpp AT delorie DOT com |
"David Grant" <dgrant79 AT hotmail DOT com> wrote:
> How can I make my EXE files smaller. I just made a Hello World program and
> it is like 200,000 bytes!
Section 8.14 of the FAQ answers this.
> Then I compile it by typing: "gxx test.cpp -o test.exe"
>
> I tried using gcc instead, but it didn't like my cout statement for some
> reason.
That's because by default it does not link with the C++ std library.
> How can I do a printf instead? It didn't seem to like that either.
printf("hello world!"); and change <iostream> to <cstdio>.
Incidently, if you do this then gcc will work because you are not
making any calls to the C++ std library.
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |