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