Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[MiNT] gcc newbie question

2 views
Skip to first unread message

Martin Tarenskeen

unread,
Feb 19, 2003, 4:30:09 AM2/19/03
to
Hi,

I have gcc installed on my EasyMiNT system. Now I'm trying to learn the
very first basics about C-programming. You know, the "Hello World" kind of
things. I don't have direct plans to become a professional C-programmer,
but it could be useful one day to know at least something about this
stuff.

A few beginners questions.

1.) My first C-program works, indeed: "Hello World!" :-)
But is it normal that the compiled binary measures about 100Kb in size ?
Seems a bit much for a simple program that does so little ? I have seen a
binary for an Intel based system that was much smaller ?

2.) How would the code look, making use of gemlib, if I wanted to print
"Hello World !" in a standard GEM alert box ? - Just to help my on the
right track towards basic GEM programming.

A little help would be welcome. Who knows what killer apps for FreeMiNT
will be written by this guy in the future ;-)
--

Martin Tarenskeen
Atari Falcon030/CT2b, MiNT 1.16a, XaAES 0.963, etcetera.


Howard Chu

unread,
Feb 19, 2003, 5:00:12 AM2/19/03
to
Yes, unfortunately the gcc library is a pig, so even small programs come out
rather large.

-- Howard Chu
Chief Architect, Symas Corp. Director, Highland Sun
http://www.symas.com http://highlandsun.com/hyc
Symas: Premier OpenSource Development and Support

Frank Naumann

unread,
Feb 19, 2003, 5:28:06 AM2/19/03
to
Hello!

> 1.) My first C-program works, indeed: "Hello World!" :-)
> But is it normal that the compiled binary measures about 100Kb in size ?
> Seems a bit much for a simple program that does so little ? I have seen a
> binary for an Intel based system that was much smaller ?

The libc (MiNTLib) is statically linked (as no shared libraries are
available for FreeMiNT). That's why the program is so big as the printf
and stdio layer is so much code.

Btw. do you stripped the binary (strip <program>)?


Tschuess
...Frank

--
ATARI FALCON 040 // MILAN 060
-----------------------------------------
http://www.cs.uni-magdeburg.de/~fnaumann/
e-Mail: fnau...@freemint.de

Frank Naumann

unread,
Feb 19, 2003, 5:32:38 AM2/19/03
to
Hello!

> Yes, unfortunately the gcc library is a pig, so even small programs come out
> rather large.

Sorry, but you mean the MiNTLib and not the gcc lib. Also the libc on
other unix systems is much bigger, you just don't see it as long the
libc is dynamically linked.

0 new messages