Hi everyone,
Since i moved to vs2010 i'm having this annoying link error 2001.
I declared some static const class members in my class and usually this error comes when you forget to declare the static fields in the source file. But in my case i actually did declare them (as you can see above).
I get the error when i try to use those static members, like VxColor::VxRed.
Should i use something like __declspec() in the declaration or the definition? Or did i mis something else?
Header file:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
class __declspec(dllexport) VxColor
{
public:
//! Constructor
inline VxColor(float _R, float _G, float _B, float _A = 255);
public:
float r, g, b, a;
conststatic VxColor VxBlack; /**< Black color */
conststatic VxColor VxRed; /**< Red color */
conststatic VxColor VxGreen; /**< Green color */
conststatic VxColor VxBlue; /**< Blue color */
conststatic VxColor VxYellow; /**< Yellow color */
conststatic VxColor VxCyan; /**< Cyan color */
};