I'm trying to start learing opengl and I use VS2010 ultimate sp1 but when I add opengl headers I'm getting errors which indicate that there are errors in files not created by me.
#include "stdafx.h"
#include <Windows.h>
#include <gl\GL.h>
#include <gl\GLU.h>
int _tmain(int argc, _TCHAR* argv[])
{
return 0;
}
errors (195 in total) this is I think the most common one:
Error 1 error C2008: '$' : unexpected in macro definition C:\Program Files\Microsoft SDKs\Windows\v7.0A\include\driverspecs.h 142
GL/gl.h
,GL/glu.h
andwindows.h
. Last but not least you should surround your inclusion ofwindows.h
with tests for the_WIN32
macro:#ifdef _WIN32 #include <windows.h> #endif