home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / lang / cplus / 19830 < prev    next >
Encoding:
Text File  |  1993-01-24  |  1.9 KB  |  52 lines

  1. Newsgroups: gnu.g++,comp.lang.c++
  2. Path: sparky!uunet!stanford.edu!ames!saimiri.primate.wisc.edu!zaphod.mps.ohio-state.edu!sdd.hp.com!think.com!yale.edu!ira.uka.de!math.fu-berlin.de!news.netmbx.de!Germany.EU.net!mcsun!sun4nl!utrcu1!klamer
  3. From: klamer@mi.el.utwente.nl (Klamer Schutte)
  4. Subject: Re: g++ vs Sun C++ 2.1
  5. Message-ID: <klamer.727889840@mi.el.utwente.nl>
  6. Keywords: g++, c++
  7. Sender: news@utwente.nl (USENET News System)
  8. Organization: University of Twente, BSC-El
  9. References: <1993Jan22.154545.6314@roadnet.com>
  10. Date: Sun, 24 Jan 1993 15:37:20 GMT
  11. Lines: 39
  12.  
  13. In <1993Jan22.154545.6314@roadnet.com> rgb@roadnet.ups.com (Rudy Bonefas) writes:
  14.  
  15. ] 1.  How do I build shared libraries with g++? I tried the -shared switch but
  16. ]         it tells me that it doesn't recognize that option.
  17.  
  18. -fpic and -fPIC should do what you want.
  19.  
  20. ] 2.  Aside from the obvious financial benefits of g++, can any of you former
  21. ]     Sun C++ users inform me of the benefits/drawbacks to switching to g++.
  22.  
  23. g++ does not give any 'Not implemented' messages. However, some things are not
  24. implemented, and make g++ dump core :-(.
  25.  
  26. g++ has (some) template support.
  27.  
  28. The C++ library with Sun C++ is a shared lib. libg++ is not, and this results
  29. in quite big files. For example, this program:
  30.  
  31. #include        <iostream.h>
  32.  
  33. main()
  34. {
  35.         cout << "Hello, world\n";
  36.  
  37.         return 0;
  38. }
  39.  
  40. resulted in a 16K executable for Sun C++, and a 81K executable for g++.
  41.  
  42. ] 3.  I understand that g++ supports templates.  Where exactly is the 
  43. ]      documentation for how to create template classes?  The only temmplate
  44. ]      implementation which I am familiar with is ODI's compiler. 
  45.  
  46. See ARM. g++ specific documentation does not exist.
  47.  
  48. --
  49. Klamer Schutte            Tel: +31-53-892778    Fax: +31-53-340045
  50. Faculty of electrical engineering -- University of Twente, The Netherlands
  51. preferred: klamer@mi.el.utwente.nl     SMTP: klamer@utelmi01.el.utwente.nl
  52.