I am trying to compile some old code a colleague gave me.
I have
MyClass.h
class MyClass
{
public:
static int UseIndex;
....
};
#include "MyClass.inl"
MyClass.inl
...
int TreeNodeData::UseIndex=1;
...
I am getting:
multiple definition of `MyClass::UseIndex'
first defined here
I got several of these errors from function that were in the .inl file but not actually marked as "inline". I wrote "inline" in front of the functions and then the errors went away. It won't let me do the same with a variable definition. Anyone know what else I could try?
Thanks,
Dave