EGCS-1.1.2: static class member not linking.
Brendan Simon
brendan@dgs.monash.edu.au
Mon Jun 7 20:41:00 GMT 1999
egcs version 1.1.2.
RedHat 5.2 GNU/Linux operating system
I have a class with some data members being declared static. Some of
the members link properly and some do not. I have the same problem with
egcs-1.1.2 using cygwin. This sample program (invoked with g++ -Wall -o
static.cc shows the problem.
// FILE : static.cc
class FOO
{
public :
void f1();
int a;
static int b;
};
void FOO::f1()
{
a += b;
}
int main()
{
FOO foo;
foo.f1();
return 0;
}
// END : static.cc
More information about the Gcc
mailing list