I have created a sample c++ project under Visual Studio 2010 with following files.
A.h
#ifndef A_H
#define A_H
#include
void foo();
#
The code works when I created a new project. I am not sure but the reason of the error might be that I added the folder "C:\Program Files\Microsoft SDKs\Windows\v7.1\Include" to the included directories at the project settings and Visual Studio already included the folder "C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Include"(which is for the 32 bit programs) by default. So there might be a clash because of that. I added the opengl header files only to the Program Files(x86) include folder, removed the include for 64 bit Program Files folder and the opengl code seems to be working now.