I've had a couple of responses indicating that perhaps the
include statement should be <string.h> instead of just
<string>,
but that is not the case.

Actually, the file will compile ( g++ -c file.cc ) - it is
the
loader ( g++ -o a.out file.o ) that doesn't work.

The actual error message (trying to compile junk.cc under
SCO) is

/usr/local/lib/gcc-lib/i586-pc-sco3.2v5.0.2/2.95.1/libstdc++.a(cstrmain.o): 
fatal error: symbol `basic_string<char,
string_char_traits<char>, 
__default_alloc_template<false, 0> >::~basic_string(void)`
multiply-defined, 
also in file junk.o 
collect2: ld returned 1 exit status

And of course it compiles and loads just fine under Linux.


Eugene wrote:
> 
> --- Jim Reimer - WA5RRH <[EMAIL PROTECTED]> wrote:
> > Please accept my apologies for the previous garbaged
> > post.
> >
> > It should have read:
> >
> > Under SCO release 5 the following will not compile
> > with g++
> >
> > #include <string>
> 
> How about:  #include <string.h> ?
> 
> > int main()
> > { string x; }
> >
> > (complains about multiply-defined things)
> >
> > I'm told that GNU ld is does not work right under
> > SCO (I have no details).
> >
> > Does anyone know of a fix/patch/workaround?
> >
> > Thanks,
> > -jdr-
> >

Reply via email to