This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
GCC 2.95.1 static string won't compile on SCO-OSR5
- To: egcs@egcs.cygnus.com
- Subject: GCC 2.95.1 static string won't compile on SCO-OSR5
- From: "+ +" <wrobbie@my-Deja.com>
- Date: Wed, 08 Sep 1999 23:25:28 -0700
- Organization: My Deja Email (http://www.my-deja.com:80)
Hellow,
I'm trying to compile the following example:
----------
#include <string>
class ctest
{
public:
static string foo;
};
string ctest::foo;
void main()
{
ctest::foo = "bar";
}
----------
Which is no problem using EGCS 1.1.1 on the same machine. GCC 2.95.1 won't
do it however:
----------
[ildev2] /usr/rob> /usr/local/gcc-2.95.1/bin/g++ test.cc
/usr/local/gcc-2.95.1/lib/gcc-lib/i586-pc-
sco3.2v5.0.0/2.95.1/libstdc++.a(cstrmain.o): fatal error: symbol `__as__t12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_tem
plate2b0i0PCc` multiply-defined, also in file /usr/tmp/cc4lMcjd.o
collect2: ld returned 1 exit status [ildev2] /usr/rob> ----------
I can't make any sense of this error... Does this mean my GCC install is broken (again), or is this invalid C++?
Thanks!
Rob Kramer
robk@cyberway.com.sg
--== Sent via Deja.com http://www.deja.com/ ==--
Share what you know. Learn what you don't.