home *** CD-ROM | disk | FTP | other *** search
- Path: usenet.eel.ufl.edu!warwick!bham!bhamcs!news
- From: Derek M Avery <D.M.Avery-CSSE94@cs.bham.ac.uk>
- Newsgroups: comp.sys.amiga.programmer
- Subject: Re: GCC C++ questions
- Date: Fri, 22 Mar 1996 10:57:47 +0000
- Organization: School of Computer Science, The University of Birmingham, U.K.
- Message-ID: <315287AB.41C67EA6@cs.bham.ac.uk>
- References: <314c6829@usura.metropolis.nl> <4ii74q$ss2@hamilton.maths.tcd.ie>
- NNTP-Posting-Host: mungo.cs.bham.ac.uk
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 2.0 (X11; I; SunOS 4.1.3 sun4c)
-
- David Malone wrote:
- >
- > joskam@usura.metropolis.nl (Jurjen Oskam) writes:
- >
- > >Hello there,
- >
- > >#include <iostream.h>
- >
- > >int main()
- > >{
- > > cout << "Hello!" << endl ;
- > >}
- >
- > >This compiles OK, but the executable is 69KB! A bit too large, IMHO. ;-) I
- > >understand that GCC uses ixemul.library, and that there is another library
- > >that's better for programs not ported from UN*X, namely libnix.library. So, how
- > >do I install libnix.library (the docs say "don't forget to link it")? I don't
- > >know how to "link" it.
- >
- > That is because by using the iostream stuff, you have got the entire
- > iostream library, which is nothing to do with either ixemul or libnix,
- > its a c++ thing. I remember getting the same shock using printf, which
- > is huge, but once you have it you have it, so you could add another 50
- >
- > cout << "Wheeee!" << endl;
- >
- > and it shouldn't make too much difference to the size. You could even
- > do stuff like printing ints, longs, doubles and the like without
- > any -=futher=- library overhead.
- >
- > I'd add if you are scared of executable sizes then :
- >
- > 1) c++ is not your language.
- > 2) don't use gcc - its got sevral +1MB executable ;)
- >
- > David
- have you tried using the -O flag for compiling? It takes longer to
- compile but optimises the code, I don`t know how good it is, but it`s
- worth a try.
-
- :-)
-
- --
- **************************************************
- * D.M.Avery-CSSE94@cs.bham.ac.uk *
- *------------------------------------------------*
- * Never take financial advice from someone who *
- * isn't extremely rich *
- **************************************************
-