2.9x to 3.2 static vars problems

albert@wickywicky.net albert@wickywicky.net
Sun Jun 1 13:58:00 GMT 2003

I'm trying to compile with g++ 3.2 an application that compiles without
problems with 2.9x. The problem is with static varibles of classes. I've
got them defined outside the class:

	int Semaphore::key;

and inside the class:

	static int key;

but I get the following error:

	order.o(.bss+0x0): multiple definition of `Semaphore::key'
	main.o(.bss+0x0): first defined here

Any ideas of what I'm doing wrong?

More information about the Gcc-help mailing list