我試圖編譯別人的項目,並且我得到了大約850個與OpenGL相關的錯誤。我在64位Windows 7上使用Visual Studio 2008,但該項目是一個Win32項目。獲取許多OpenGL錯誤
正如你所看到的,下面的錯誤是從gl.h
在Windows SDK包含文件夾下Program Files
,而不是Program Files (x86)
所以我猜這是問題的一部分。我已經嘗試添加包含gl.h並且在Program Files (x86)
下的.NET 2003 include目錄,但它仍然嘗試使用gl.h的版本號Program Files
。
此外,該項目採用的wxWidgets 2.4.2和我無法找到被包含在解決方案本身的gl.h
任何實例,所以我不知道是什麼拉動的
更新:仍無法編譯這個。我試圖編譯的實際項目是「Interactive Digital Photomontage」工具(鏈接中的源代碼)。他們包括一個VS2003項目文件和說明,我仔細跟蹤。我甚至嘗試過在VS2003中編譯並得到相同的錯誤。我很好奇,如果有人有他們的系統嘗試這一點,看看他們是否得到相同的錯誤。需要安裝wxWidgets 2.4.2。
有什麼想法?我在下面列出了一些錯誤的例子。謝謝。
1>C:\Program Files\Microsoft SDKs\Windows\v6.0A\\include\GL/gl.h(1152) : error C2144: syntax error : 'void' should be preceded by ';'
1>C:\Program Files\Microsoft SDKs\Windows\v6.0A\\include\GL/gl.h(1152) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>C:\Program Files\Microsoft SDKs\Windows\v6.0A\\include\GL/gl.h(1152) : error C2146: syntax error : missing ';' before identifier 'glAccum'
1>C:\Program Files\Microsoft SDKs\Windows\v6.0A\\include\GL/gl.h(1152) : error C2182: 'APIENTRY' : illegal use of type 'void'
1>C:\Program Files\Microsoft SDKs\Windows\v6.0A\\include\GL/gl.h(1152) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>C:\Program Files\Microsoft SDKs\Windows\v6.0A\\include\GL/gl.h(1153) : error C2144: syntax error : 'void' should be preceded by ';'
1>C:\Program Files\Microsoft SDKs\Windows\v6.0A\\include\GL/gl.h(1153) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>C:\Program Files\Microsoft SDKs\Windows\v6.0A\\include\GL/gl.h(1153) : error C2086: 'int WINGDIAPI' : redefinition
頭文件,無論位數相同(他們使用'在需要的地方#if')之前,包括 「WINDOWS.H」 ,所以不要不用擔心從64位編譯器目錄加載頭文件。 – 2011-06-03 04:36:17