本文介绍了GLSL-Visual C ++上无法解析的外部的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要开始使用GLSL.我应该怎么做才能解决这个问题:

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

推荐答案

您似乎正在使用某种形式的库来包装GL入口点(您列出的入口点不是直接的GL入口点).

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

此库(GLEE吗?)可能带有您需要链接的.lib文件.

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

来自GLEE的项目页面(我的猜测是基于对谁的快速搜索正在对GL调用使用前缀p):

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

要使用GLee,请包括 GLee.h,然后只需链接到GLee.lib 或者将GLee.c添加到您的 项目.

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

这篇关于GLSL-Visual C ++上无法解析的外部的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-30 02:59