This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

gcc2.95.1 -linking error


 
 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
 
Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]