开发者

GLSL - unresolved external on Visual C++

开发者 https://www.devze.com 2023-02-03 13:57 出处:网络
I\'m getting started with the GLSL. What should i do to resolve this: error LNK2001: unresolved external symbol _pglLinkProgram

I'm getting started with the GLSL. What should i do to resolve this:

error LNK2001: unresolved external symbol _pglLinkProgram
error LNK2001: unresolved external symbol _pglAttachShader
error LNK2001: unresolved external symbol _pglCompileShader
error LNK2001: unresolved external symbol _pglShaderSource
error LNK2001: unresolved external symbol _pglCreateShader
error LNK2001: unresolved external symbol _pglCreateProgram
error LNK2001: unresolved external 开发者_如何学Pythonsymbol _pglGetProgramInfoLog
error LNK2001: unresolved external symbol _pglGetProgramiv
error LNK2001: unresolved external symbol _pglUseProgram


You seem to be using some form of library that wraps GL entrypoints (the entrypoints you list are not direct GL entrypoints).

This library (GLEE ?) likely is coming with a .lib file that you need to link against.

Coming from the project page of GLEE (my guess, based on a quick googling of who is using the prefix p for GL calls):

Usage examples

To use GLee, include GLee.h, then simply link to GLee.lib or alternatively add GLee.c to your project.


You have to link your program against opengl32.lib, see here.


I recommend you start using GLEW since OpenGL > 1.5 on Windows is a bit of a pain in the ass. This will get you all OpenGL entry points without messing with extension pointers.

0

精彩评论

暂无评论...
验证码 换一张
取 消