c++ undefined reference to static variable [duplicate]
This question already has an answer here: static variable link error 2 answers I have no idea why this code isn't working. All the source files compile but when I try to link them the compiler yells at me with an undefined reference error. Here's the code: main.cpp: #include "SDL/SDL.h" #include "Initilize.cpp" int main(int argc, char* args[]) { //Keeps the program looping bool quit = false; SDL_Event exit; //Initilizes, checks for errors if(Initilize::Start() == -1) { SDL_Quit(); } //main program loop while(quit == false) { //checks for events while(SDL_PollEvent(&exit)) { //checks for type