This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
gcc2.95.1 -linking error
- To: gcc-bugs at gcc dot gnu dot org
- Subject: gcc2.95.1 -linking error
- From: Santosh Mathews <Santosh dot Mathews at telcosoft dot com>
- Date: Mon, 10 Jan 2000 09:25:31 -0500
- Organization: Telcosoft. LLC.
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