enginetest.cpp: #include "engine.h" // THIS IS BAD ACCORDING TO VS2K8! int main() { engine game = new engine(800,600, "Test stuff"); if(!game.initWasOk) { return 1; } while(game.running) { game.Draw(); } return 0; } // This compiles fine: #include "engine.h" int main() { engine *game = new engine(800,600, "Test stuff"); if(!game->initWasOk) { return 1; } while(game->running) { game->Draw(); } return 0; } engine.h: #pragma once #define GLFW_BUILD #pragma comment(lib, "OpenGl32.lib") #pragma comment(lib, "glu32.lib") #pragma comment(lib, "glfw.lib") #include #include #include #include "window.h" using namespace std; class engine { int width; int height; int mouseposx; int mouseposy; string windowname; double time; window *testwindow; public: int initWasOk; int running; void Draw(); engine(int width, int height, string windowname); };