g++ simple linking problem (new install)

Steve Collins scollins@apexvoice.com
Tue Nov 23 15:36:00 GMT 1999


Hi, I am 
trying to get gcc/g++ 2.95.1 working on my SCO 5.0.5 box.  I have built and 
installed it a couple of times, but I am still getting a multiple-defined symbol 
when compiling the following simple program:
 
#include <vector> #include 
<string> #include <iostream.h>
 
int main(int argc, char **argv) {
  string s4(7, 'a');   cout 
<< s4 << endl; }
 
 g++ -c test.cc 78% g++ 
test.o /usr/local/lib/gcc-lib/i686-pc-sco3.2v5.0.5/2.95.1/libstdc++.a(cstrmain.o): 
fatal error: symbol `basic_string<char, string_char_traits<char>, 
__default_alloc_template<false, 0> >::~basic_string(void)` 
multiply-defined, also in file test.o collect2: ld returned 1 exit 
status 79% 
I realize 
(fervently hope) that this is probably something simple that there is a quick 
answer for.  If there is another place to seek help, I apologize, but I 
couldn't find this anywhere.
 
Thanks in 
advance
 
Steve
 
------------------------- Steve Collins Apex Voice 
Communications 818.379.8400 ext 113 
 



More information about the Gcc-bugs mailing list