home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 5949 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  2.2 KB

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