我使用的是带有VS2012的Windows7 64位。当包含"gl/gl.h"时,当编译器试图编译glee.h时,我会遇到100多个错误。在像其他人说的那样包含gl.h之前,我已经在glee.h中包含了windows.h,但我仍然会遇到错误。如果你需要任何其他信息,我很乐意在这里发布。
错误:http://usandfriends.x10.mx/OTHER/100s-of-errors-when-trying-to-compile-glee_h-vs2012-c__.html
我的.cpp文件:
#include "stdafx.h"
#include <Windows.h>
#include "gl/gl.h"
int _tmain(int argc, _TCHAR* argv[]) {
return 0;
}
不要修改任何系统头文件(如glee.h或windows.h)。
这个.cpp文件对我来说编译得很好:
#include "stdafx.h"
#include <Windows.h>
#include "GLee.h"
int _tmain(int argc, _TCHAR* argv[])
{
return 0;
}
这就是你所需要的。当包含glee.h时,没有必要包含gl.h。事实上,你也不必包含Windows.h,因为它已经包含在glee.h中了,但这并不重要。