Friday, March 18, 2011

multiple definition of

You get an error such as
multiple definition of `MyClass::MyVariable'

Most probably its a static variable which is declared as well as defined in the header file.

Defining the static variable is not a good idea, you should always define your static variables in the corresponding source file.

No comments:

Post a Comment