You probably include windows.h after including GL/glfw.h.
You don’t need to include windows.h in order to use OpenGL together with GLFW. GL/glfw.h takes care of that. If you DO need to include windows.h, for some other reason, do it BEFORE including GL/glfw.h.
Ok, nvm, putting the #include <gl/glfw.h> below the other header files fixed the problem. But i still dont understand which of the files i listed would include <windows.h>
#include <string> // Include this to use strings #include <fstream> #include <list>
Chanses are, that IL (just like GLFW) only needs a fracation of the defines in windows.h (GLFW only needs two constants). Unfortunately these constants are compiler specific, so as it turned out I had to write a whole bunch of ifdef’s and conditional code into glfw.h in order to replace #include <windows.h>.