gcc2.95.1 -linking error
Santosh Mathews
Santosh.Mathews@telcosoft.com
Mon Jan 10 10:28:00 GMT 2000
ÃÂ
ÃÂ I have the following source codeÃÂ , which gives a linking
error
ÃÂ
#include <string>
main()
{
ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ string fname("port");
}
ÃÂ
$>g++ -g Test.cpp
ÃÂ
UX:ld: ERROR: /usr/local/lib/gcc-lib/i686-UnixWare7.0.1-sysv5/2.95.1/libstdc++.a(cstrmain.o):
fatal error: symbol `basic_string<char, string_char_traits<char>,
__default_alloc_template<false, 0> >::npos` multiply-defined, also in
file /var/tmp/ccDEbDs0.o
collect2: ld returned 1 exit status
ÃÂ
ÃÂ
I have
$>g++ -v
Reading specs from /usr/local/lib/gcc-lib/i686-UnixWare7.0.1-sysv5/2.95.1/specs
gcc version 2.95.1 19990816 (release)
$>uname -a
UnixWare copper 5 7.1.0 i386 x86at SCO UNIX_SVR5
ÃÂ
Is there any way the above code couldÃÂ link successfully. Any
pointers/help would be well appreciated
ÃÂ
Thanks
Santosh
--ÃÂ
Santosh Mathews
Santosh.Mathews@telcosoft.com
ÃÂ
More information about the Gcc-bugs
mailing list