1

我正在使用Windows7 64bit與VS2012。當包含「gl/gl.h」時,當編譯器嘗試編譯glee.h時,會出現100多個錯誤。在包含gl.h之前,我已經在glee.h中包含了windows.h,就像其他人說的那樣,但我仍然收到錯誤。如果您需要任何其他信息,我會很樂意在此處發佈。VS2012C++:編譯glee.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; 
} 
+0

GL/gl.h的VS2012版本不*不*包括glee.h.文件命名聽起來像你一直在覆蓋文件。餿主意。 –

回答

1

不修改任何系統頭文件(如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中,但這並不重要。