From: BOSTLEY PHIL JOSEPH (bostley@juliet.cs.colorado.edu)
Date: 01/31/93


From: bostley@juliet.cs.colorado.edu (BOSTLEY PHIL JOSEPH)
Subject: Re: problems with g++ 2.3.3
Date: Sun, 31 Jan 1993 21:57:14 GMT

In article <kotulla.728314242@talisker> kotulla@talisker.informatik.rwth-aachen.de (Axel Kotulla) writes:
>Hey,
>
>I have one question in regard to the new g++ in GCC 2.3.3:
>If I try to compile the most simplest C++-program:
>
>#include <iostream.h>
>
>main()
>{
> cout << "Hello world\n";
>}
>
>I get the linker-message:
>% g++ cpp.cc
>/tmp/cca002021.o: Undefined symbol _cout referenced from text segment
>/tmp/cca002021.o: Undefined symbol ostream::operator<<(const char *) referenced from text segment
>
>Does anybody know what is wrong, perhaps in my environment-settings?
>
>Thanks in advance
>
>Axel Kotulla (E-Mail: axel@pool.informatik.rwth-aachen.de)
>--
>Axel Kotulla (E-Mail: axel@pool.informatik.rwth-aachen.de)
>

T.his is because iostream.o (among other things) is missing from libc.sa
Try it again with the -static option and it should work. This will use
libc.a instead of libc.sa. The executable will be huge but it should
work.

  PJ

===================================================================
P.J. Bostley (E-Mail: bostley@kinglear.cs.colorado.edu)