我正在尝试从该站点运行 GLSL 程序并收到如下错误。除了opengl,我需要安装哪些基本库?我在 Windows 机器上需要这个。
main.cpp:72:30: error: 'GLchar' does not name a type
main.cpp:72:38: warning: ISO C++ forbids declaration of 'vShaderFile' with no type [-fpermissive]
main.cpp:72:57: error: 'GLchar' does not name a type
main.cpp:72:65: warning: ISO C++ forbids declaration of 'fShaderFile' with no type [-fpermissive]
main.cpp: In function 'void initShader(const int*, const int*)':
main.cpp:75:5: error: 'GLchar' was not declared in this scope
main.cpp:75:13: error: 'vSource' was not declared in this scope
main.cpp:75:23: error: 'fSource' was not declared in this scope
main.cpp:80:43: error: cannot convert 'const int*' to 'const char*' for argument '1' to 'char* readShaderSource(const char*)'
main.cpp:83:43: error: cannot convert 'const int*' to 'const char*' for argument '1' to 'char* readShaderSource(const char*)'
main.cpp:88:30: error: 'GL_VERTEX_SHADER' was not declared in this scope
main.cpp:88:46: error: 'glCreateShader' was not declared in this scope
main.cpp:89:30: error: 'GL_FRAGMENT_SHADER' was not declared in this scope
main.cpp:90:31: error: 'glCreateProgram' was not declared in this scope
main.cpp:94:36: error: 'glAttachShader' was not declared in this scope
main.cpp:99:39: warning: ISO C++ forbids declaration of 'type name' with no type [-fpermissive]
main.cpp:99:39: warning: ISO C++ forbids declaration of 'type name' with no type [-fpermissive]
main.cpp:99:33: error: expected primary-expression before 'const'
main.cpp:99:33: error: expected ')' before 'const'
main.cpp:100:39: warning: ISO C++ forbids declaration of 'type name' with no type [-fpermissive]
main.cpp:100:39: warning: ISO C++ forbids declaration of 'type name' with no type [-fpermissive]
main.cpp:100:33: error: expected primary-expression before 'const'
main.cpp:100:33: error: expected ')' before 'const'
main.cpp:104:28: error: 'glCompileShader' was not declared in this scope
main.cpp:109:28: error: 'GL_COMPILE_STATUS' was not declared in this scope
main.cpp:109:54: error: 'glGetShaderiv' was not declared in this scope
main.cpp:117:26: error: 'glLinkProgram' was not declared in this scope
main.cpp:118:28: error: 'GL_LINK_STATUS' was not declared in this scope
main.cpp:123:25: error: 'glUseProgram' was not declared in this scope