public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Juan Ignacio Garzón" <jigarzon82-chan@yahoo.com.ar>
To: GCC Mailing List <gcc@gcc.gnu.org>
Subject: Reducing the size of the binaries
Date: Sat, 25 Sep 2004 21:50:00 -0000	[thread overview]
Message-ID: <20040925190401.87589.qmail@web53210.mail.yahoo.com> (raw)
In-Reply-To: <20040925175040.GA67405@cs.huji.ac.il>

Hi i'm compiling a very simple program that consists
in 3 files:
-a .h file (20 lines of code), which declares a class
and includes iostream
-a .cpp file (33 lines of code), including only the .h
file.
-main.cpp (11 lines), which includes only the .h.

So, as you can see, its a very very simple program
with 1 class and a main. I'm just beginning a proyect.
When I compiled this using the following command line:
g++.exe -c ... -o ... -I ... -DDEBUG -Wall -pedantic
-g -ansi -fno-inline

the result was:
a .o file for the main.cpp (803 KB)
a .o file for the .cpp (class definition) ( 810 KB)
the .exe file (1251 KB)

I'm using gcc 3.2 (mingw32)
I cannot understand why are they so big in size... I
think im doing something bad, but I don't know what...

If I include stdlib.h in any file, it results in a 2
MB exe.
I have a lot of programs made with C++ and their
binaries are smaller than mine, and mi program has
less than 100 lines. What's wrong?

Thanks in advance...



	
	
		
___________________________________________________________
100mb gratis, Antivirus y Antispam
Correo Yahoo!, el mejor correo web del mundo
http://correo.yahoo.com.ar

  reply	other threads:[~2004-09-25 19:04 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-25 11:44 -mtune != -march (>=) - optimizing for a higher architecture Tom Alsberg
2004-09-25 14:56 ` Paul Brook
2004-09-25 19:37   ` Tom Alsberg
2004-09-25 21:50     ` Juan Ignacio Garzón [this message]
2004-09-25 21:51       ` Reducing the size of the binaries Kevin Puetz
2004-09-25 21:51       ` Oscar Fuentes

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040925190401.87589.qmail@web53210.mail.yahoo.com \
    --to=jigarzon82-chan@yahoo.com.ar \
    --cc=gcc@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).