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]

Problems with egcs on Unixware 7 system


I am currently attempting to port an application written in c++ which
successfully compiles and runs using egcs under Linux and Solaris to
Unixware 7.

I am not totally familiar with the Unixware enviroment which may explain why
I am finding it difficult to get a working egcs compiler built. I can
successfully build egcs 1.1.1 but when I attempt to build a non-trivial c++
program it falls over on linking.

For example, the following program:

// test.cxx
#include <iostream>
#include <string>

int main(void)
{
     cout << "Hello\n";

     string s = "World\n";

     cout << s;
}                 

gives the following error:

g++ test.cxx -o test

UX:ld: ERROR: /usr/local/egcs111new/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 /usr/tmp/ccNqGaRz.o
collect2: ld returned 1 exit status

I'm wondering if there is anyone out there with experience of using egcs of
Unixware 7 who may be able to help. I've searched the egcs web site and
can't find any ducumentation that helps, I've even tried installing a binary
distribution of egcs 1.0.1 and that didn't help either which implies that it
may be a linking problem.


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