我遇到了 glew 和链接器错误的问题。我有:
- 将 glew32.dll 和 glew32d.dll 放入系统,System32 和 SysWOW64
- 将 glew.h 放在 GL 文件夹中
- 将 glew32.lib、glew32d.lib、glew32s.lib 放入 Lib 文件夹
- 将 glew32.lib、glew32d.lib、glew32s.lib、glut32.lib、opengl32.lib 放在附加依赖项中
- 将 GLEW_STATIC 放入预处理器定义中
但是,我仍然收到以下错误:
1>project2.obj : error LNK2001: unresolved external symbol ___glewGetProgramInfoLog
1>project2.obj : error LNK2001: unresolved external symbol ___glewGetShaderInfoLog
1>project2.obj : error LNK2001: unresolved external symbol ___glewGetProgramiv
1>project2.obj : error LNK2001: unresolved external symbol ___glewGetShaderiv
1>project2.obj : error LNK2001: unresolved external symbol ___glewIsShader
1>project2.obj : error LNK2001: unresolved external symbol ___glewGetUniformLocation
1>project2.obj : error LNK2001: unresolved external symbol ___glewLinkProgram
1>project2.obj : error LNK2001: unresolved external symbol ___glewAttachShader
1>project2.obj : error LNK2001: unresolved external symbol ___glewCreateProgram
1>project2.obj : error LNK2001: unresolved external symbol ___glewCompileShader
1>project2.obj : error LNK2001: unresolved external symbol ___glewShaderSource
1>project2.obj : error LNK2001: unresolved external symbol ___glewCreateShader
1>project2.obj : error LNK2001: unresolved external symbol ___glewEnableVertexAttribArray
1>project2.obj : error LNK2001: unresolved external symbol ___glewVertexAttribPointer
1>project2.obj : error LNK2001: unresolved external symbol ___glewBufferData
1>project2.obj : error LNK2001: unresolved external symbol ___glewBindBuffer
1>project2.obj : error LNK2001: unresolved external symbol ___glewGenBuffers
1>project2.obj : error LNK2001: unresolved external symbol ___glewBindVertexArray
1>project2.obj : error LNK2001: unresolved external symbol ___glewGenVertexArrays
1>project2.obj : error LNK2001: unresolved external symbol ___glewUniformMatrix3fv
1>project2.obj : error LNK2001: unresolved external symbol ___glewUniformMatrix4fv
1>project2.obj : error LNK2001: unresolved external symbol ___glewUniform3f
1>project2.obj : error LNK2001: unresolved external symbol ___glewUniform1f
1>project2.obj : error LNK2001: unresolved external symbol ___glewUseProgram
我有什么明显的遗漏吗?还有什么我可以尝试的吗?谢谢。