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