-1

ここに記載されている手順を正確に実行すると、243エラーが発生します?! 何が起こっていますか?

Error   1   error C2144: syntax error : 'void' should be preceded by ';'    c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1152    Win32OpenGL 1
Error   2   error C4430: missing type specifier - int assumed. Note: C++ does not support default-int   c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1152    Win32OpenGL 1
Error   3   error C2146: syntax error : missing ';' before identifier 'glAccum' c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1152    Win32OpenGL 1
Error   4   error C2182: 'APIENTRY' : illegal use of type 'void'    c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1152    Win32OpenGL 1
Error   5   error C4430: missing type specifier - int assumed. Note: C++ does not support default-int   c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1152    Win32OpenGL 1
Error   6   error C2144: syntax error : 'void' should be preceded by ';'    c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1153    Win32OpenGL 1
Error   7   error C4430: missing type specifier - int assumed. Note: C++ does not support default-int   c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1153    Win32OpenGL 1
Error   8   error C2086: 'int WINGDIAPI' : redefinition c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1153    Win32OpenGL 1
Error   9   error C2146: syntax error : missing ';' before identifier 'glAlphaFunc' c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1153    Win32OpenGL 1
Error   10  error C2182: 'APIENTRY' : illegal use of type 'void'    c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1153    Win32OpenGL 1
Error   11  error C2086: 'int APIENTRY' : redefinition  c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1153    Win32OpenGL 1
Error   12  error C4430: missing type specifier - int assumed. Note: C++ does not support default-int   c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1153    Win32OpenGL 1
Error   13  error C2146: syntax error : missing ';' before identifier 'GLboolean'   c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1154    Win32OpenGL 1
Error   14  error C4430: missing type specifier - int assumed. Note: C++ does not support default-int   c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1154    Win32OpenGL 1
Error   15  error C2086: 'int WINGDIAPI' : redefinition c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1154    Win32OpenGL 1
Error   16  error C2146: syntax error : missing ';' before identifier 'glAreTexturesResident'   c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1154    Win32OpenGL 1
Error   17  error C2371: 'APIENTRY' : redefinition; different basic types   c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1154    Win32OpenGL 1

等々。私が実装していない gl.h ですべてのエラーが発生していることがわかります。私はwin32アプリケーションの空のプロジェクトを作成し、それにソースファイルを追加しました.cppファイルにはこれらのコードだけがあります。

#include <gl\GL.h>
#include <gl\GLU.h>
#include <gl\glut.h>


int main()
{
    return 0;
} 
4

1 に答える 1

0

ここで同様の質問を参照してください: glut と glew のインクルードと型指定子に関する突然の問題

もう1つはここにあります:Getting many OpenGL Errors

私が使用している私のアプリ:

#include "gl/glew.h"
#include "gl/wglew.h"
#include "freeglut.h"
于 2013-07-20T21:06:01.587 に答える