Q: C++ : Undefined reference In: graphics.h:
 class window {
     friend class mouse;
 private:
     static int width;         // in pixels
     static int height;        // in pixels
     static vector<object> objects;
     static size_t selected_obj;
     static mouse mus;
     static int move;
 public:
     static void setmove (int move_) { window::move = move_; } //<--- problem
     static void push_back (const object& obj)
         { objects.push_back (obj); }
     static void setwidth (int width_) { width = width_; }
     static void setheight (int height_) { height = height_; }
     static void main();
 };

In one of my functions in a class called interp.cpp:
I'm trying to do this:
window::setmove(4);

But sadly, I get this error: 
interp.o: In function `window::setmove(int)':
/afs/cats.ucsc.edu/users/m/graphics.h:72: undefined reference to `window::move'

It's weird because in another function inside the interp.cpp, I'm able to use window::push_back(new_shape);
Any idea what could be wrong? Thank you.
EDIT: Because it's been marked as duplicate: I don't see how it could be a compiler issue because I'm able to use the other functions inside window class.

A: C++ requires a definition for your static members. Definition of the static variable move in interp.cpp would resolve the problem. You need to add static int window::move; in interp.cpp.
Credits to: MattMcNabb and juanchopanza for their comments.
