libstdc++ multiply-defined error

John Hodgkinson john.hodgkinson@bj.co.uk
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>

main()
{
	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?

John
Mail :      john.hodgkinson@bj.co.uk
Phone :  01270 844039
WWW : http://www.bj.co.uk




More information about the Gcc mailing list