libstdc++ multiply-defined error

John Hodgkinson
Sun Jan 31 23:58:00 GMT 1999

Dear experts,
    I have just built ecgs1.1 for Unixware V7 and I am having problems using string.

noddy program :-

#include <string>
#include <iostream>

	string message("Hello John\n");
	cout << message;
	return 0;

attempts to build give :-

g++     hstring.cpp   -o hstring                                               
 UX:ld: ERROR: /usr/local/lib/libstdc++.a(cstrmain.o): fatal error: symbol `basic_string<char, string_char_traits<char>, __default_alloc_template<0, 0> >::rep(void) const` multiply-defined, also in file /var/tmp/ccSCRree.o                   
collect2: ld returned 1 exit status                                             
Can anyone help?

Mail :
Phone :  01270 844039

More information about the Gcc mailing list