gpt4 book ai didi

c++ - GLEW 链接错误

转载 作者:塔克拉玛干 更新时间:2023-11-03 01:07:43 27 4
gpt4 key购买 nike

<分区>

我试图从网站上整理一个 GLSL 示例程序,这样我就可以了解着色器。

着色器示例程序来自http://www.swiftless.com/tutorials/glsl/1_setup.html#DL

1>------ Build started: Project: TheLightingExperiment2, Configuration: Debug Win32 ------

1>shader.obj : error LNK2001: unresolved external symbol __imp____glewLinkProgram

1>shader.obj : error LNK2001: unresolved external symbol __imp____glewAttachShader

1>shader.obj : error LNK2001: unresolved external symbol __imp____glewCreateProgram

1>shader.obj : error LNK2001: unresolved external symbol __imp____glewCompileShader

1>shader.obj : error LNK2001: unresolved external symbol __imp____glewShaderSource

1>shader.obj : error LNK2001: unresolved external symbol __imp____glewCreateShader

1>shader.obj : error LNK2001: unresolved external symbol __imp____glewDeleteProgram

1>shader.obj : error LNK2001: unresolved external symbol __imp____glewDeleteShader

1>shader.obj : error LNK2001: unresolved external symbol __imp____glewDetachShader

1>shader.obj : error LNK2001: unresolved external symbol __imp____glewUseProgram

1>C:\Users\Shawn\Desktop\TheLightingExperiment2\Debug\TheLightingExperiment2.exe : fatal error LNK1120: 10 unresolved externals

========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

这些错误似乎是由于 glew 没有正确链接造成的。但是我按照 glew 的文档链接 glew @ http://glew.sourceforge.net/install.html

它仍然给我这些错误。我已将 glew32.lib 放入 linker->input 中。我把glew32.lib放到了VC的lib目录下,glew includes也放到了VC的include目录下。通过谷歌搜索我的问题,这似乎是解决方案,但它对我不起作用。

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com