Mail Archives: djgpp/1994/08/19/20:42:27
Amazingly enough Chendi Zhang said:
>
> Whenever I compile a VERY small program like:
>
> #include <stdio.h>
> main()
> {
> printf("Hello");
> }
>
> , The output by djgpp is about 30-35k. I read somewhere that it has
> something to do with a -g switch. How do I make my progs smaller?
-g includes deubgging info, and makes the executable larger (lots
of plain text there). Try the -s option, or run
strip a.out
where a.out is the executable.
Btw, printf() is a large function, and so any program that
includes a call to that function will have a certain minimal
size, no matter what you do. Try using puts() instead and see if
it makes a smaller program.
--
Mike Castle .-=NEXUS=-. Life is like a clock: You can work constantly
mcastle AT cs DOT umr DOT edu and be right all the time, or not work at all
mcastle AT umr DOT edu and be right at least twice a day. -- mrc
We are all of us living in the shadow of Manhattan. -- Watchmen
- Raw text -