简体   繁体   中英

GLSL - unresolved external on Visual C++

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 symbol _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.

您必须将程序链接到opengl32.lib,请参见此处

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM