From: HJ Lu (hlu@luke.eecs.wsu.edu)
Date: 04/19/93


From: hlu@luke.eecs.wsu.edu (HJ Lu)
Subject: Re: g++ compiler problems
Date: Mon, 19 Apr 1993 14:32:17 GMT

In article <C5q2Dz.sD@informatik.uni-hamburg.de> hamdy@rzdspc16.informatik.uni-hamburg.de (Safuat Hamdy) writes:
>In article <1993Apr18.204856.12842@serval.net.wsu.edu>, hlu@eecs.wsu.edu (HJ Lu) writes:
>|> In article <121204@netnews.upenn.edu>, ericj@eniac.seas.upenn.edu (Eric Reiter) writes:
>|> |>
>|> |> I am having trouble using the g++ compiler. I try to compiler a
>|> |> simple program using cout and get thses errors:
>|> |>
>|> |> test.o: Undefined symbol _cout referenced from text segment
>|> |> test.o: Undefined symbol operator<<(ostream &, const char *)
>|> |> referenced from text segment
>
>...
>
>|> Please always sepcify which gcc and libc you are using. Please
>|> upgrade to gcc 2.3.3 and libc 4.3.3.
>|>
>|> H.J.
>
>Sorry, sorry, correct me if I'm wrong, but this has rather to do with the
>fact that the linker assumes the presence of shared libraries by default.
>But they do not exist for g++, so you have to link with the option "-static".
>I had this problem too, someone gave me that hint and it worked.
>

In libc 4.3.3, there is minimum support for g++ in DLL. BTW, you need
gcc 2.3.3 to use libc 4.3.3.

H.J.