This is the mail archive of the gcc@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]

libstdc++ multiply-defined error


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



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