home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / sys / amiga / programm / 15939 < prev    next >
Encoding:
Text File  |  1992-11-17  |  1.9 KB  |  49 lines

  1. Newsgroups: comp.sys.amiga.programmer
  2. Path: sparky!uunet!gumby!wmu-coyote!22black
  3. From: 22black@sol.cs.wmich.edu (Martin Black)
  4. Subject: Re: found g++ in gcc, but can`t seem to co
  5. Message-ID: <1992Nov17.070253.1820@sol.cs.wmich.edu>
  6. Organization: Western Michigan Univ. Comp. Sci. Dept.
  7. References: <1992Nov14.082116.254@bernina.ethz.ch> <1992Nov16.070023.20559@eua.ericsson.se>
  8. Date: Tue, 17 Nov 1992 07:02:53 GMT
  9. Lines: 38
  10.  
  11. etxpihl@eua.ericsson.se (Tomas Pihl) writes:
  12.  
  13. >In article 254@bernina.ethz.ch, wild@nessie.cs.id.ethz.ch (Markus Wild) writes:
  14. >> In article <1992Nov13.235545.9456@news.cs.indiana.edu> "Stefan Berg" <sgberg@peach.ucs.indiana.edu> writes:
  15. >> >The program I tried to compile just compiled fine on a Sun using g++.
  16. >> >It is a fairly simple program. I`m running gcc2.2.2 (fix1-fix3) on my
  17. >> >Amiga.
  18. >> >
  19. >> >The error messages I get are all of the form:
  20. >> >
  21. >> >"test.o: Undefined symbol XXX referenced from test segment"
  22. >> >
  23. >> >Where XXX is _cerr, ___ls__FR7ostreamPCc, and many others.
  24. >> 
  25. >> If using gcc, you have to explicitly specify to link with -lg++. When using
  26. >> g++, the driver takes care of specifying -lg++, so you don't have to specify
  27. >> it explicitly.
  28.  
  29. >I had the same problem. I've tried to specify -lg++, but it didn't work. I turned
  30. >on verbose mode (-v) and saw that -lg++ now suddenly was -lg ?!. So, I renamed
  31. >libg++.a to libg.a and everything work just fine.  Don't ask me how g++ could end
  32. >up as just g...
  33.  
  34. >One more question when I'm on the air:
  35.  
  36. > How can a simple C++-program that just do a cout << "Hellp world" end up as a 
  37. >54kb binary file?
  38.  
  39. [laugh]  if you think that is big [laugh] try running it on sunOs.  I get a
  40. hello world to be at 250k.  In fact as soon as I include the iostream.h and
  41. use it once the files are a minimum 250k.  luckily it doesn't grow much 
  42. after that, that is to say you can have a couple thousand extra more lines
  43. and it doesn't grow but a few k in size.
  44.  
  45. Martin
  46. tm0
  47.  
  48.  
  49.