这是在Visual Studio 2010中。我无法找到任何文档,说明哪个库包含这些功能。我已经将这些库列为依赖项:
Qt5OpenGL.lib;Qt5Gui.lib;Qt5Widgets.lib;qtmaind.lib;Qt5Cored.lib;Qt5Guid.lib;Qt5OpenGLd.lib;Qt5Sqld.lib;Qt5Networkd.lib;opengl32.lib;glu32.lib
我很感激这里的任何帮助,因为我被困了。
1>videograph_opengld.lib(videorenderer.obj) : error LNK2001: unresolved external symbol _glDeleteProgramsARB@8
1>videograph_opengld.lib(videorenderer.obj) : error LNK2001: unresolved external symbol _glDeleteShader@4
1>videograph_opengld.lib(videorenderer.obj) : error LNK2001: unresolved external symbol _glDeleteProgram@4
1>videograph_opengld.lib(videorenderer.obj) : error LNK2001: unresolved external symbol _glDetachShader@8
1>videograph_opengld.lib(videorenderer.obj) : error LNK2001: unresolved external symbol _glDeleteBuffersARB@8
1>videograph_opengld.lib(videorenderer.obj) : error LNK2001: unresolved external symbol _glUnmapBufferARB@4
1>videograph_opengld.lib(videorenderer.obj) : error LNK2001: unresolved external symbol _glBindBufferARB@8
1>videograph_opengld.lib(videorenderer.obj) : error LNK2001: unresolved external symbol _glMapBufferARB@8
1>videograph_opengld.lib(videorenderer.obj) : error LNK2001: unresolved external symbol _glActiveTexture@4
1>videograph_opengld.lib(videorenderer.obj) : error LNK2001: unresolved external symbol _glUseProgram@4
1>videograph_opengld.lib(videorenderer.obj) : error LNK2001: unresolved external symbol _glProgramLocalParameter4fARB@24
1>videograph_opengld.lib(videorenderer.obj) : error LNK2001: unresolved external symbol _glUniform4f@20
1>videograph_opengld.lib(videorenderer.obj) : error LNK2001: unresolved external symbol _glGetUniformLocation@8
1>videograph_opengld.lib(videorenderer.obj) : error LNK2001: unresolved external symbol _glUniform1i@8
1>videograph_opengld.lib(videorenderer.obj) : error LNK2001: unresolved external symbol _glLinkProgram@4
1>videograph_opengld.lib(videorenderer.obj) : error LNK2001: unresolved external symbol _glAttachShader@8
1>videograph_opengld.lib(videorenderer.obj) : error LNK2001: unresolved external symbol _glCreateProgram@0
1>videograph_opengld.lib(videorenderer.obj) : error LNK2001: unresolved external symbol _glCompileShader@4
1>videograph_opengld.lib(videorenderer.obj) : error LNK2001: unresolved external symbol _glShaderSource@16
1>videograph_opengld.lib(videorenderer.obj) : error LNK2001: unresolved external symbol _glCreateShader@4
1>videograph_opengld.lib(videorenderer.obj) : error LNK2001: unresolved external symbol _glGetShaderInfoLog@16
1>videograph_opengld.lib(videorenderer.obj) : error LNK2001: unresolved external symbol _glGetShaderiv@12
1>videograph_opengld.lib(videorenderer.obj) : error LNK2001: unresolved external symbol _glGetProgramInfoLog@16
1>videograph_opengld.lib(videorenderer.obj) : error LNK2001: unresolved external symbol _glGetProgramiv@12
1>videograph_opengld.lib(videorenderer.obj) : error LNK2001: unresolved external symbol _glProgramStringARB@16
1>videograph_opengld.lib(videorenderer.obj) : error LNK2001: unresolved external symbol _glBindProgramARB@8
1>videograph_opengld.lib(videorenderer.obj) : error LNK2001: unresolved external symbol _glGenProgramsARB@8
1>videograph_opengld.lib(videorenderer.obj) : error LNK2001: unresolved external symbol _glBufferDataARB@16
1>videograph_opengld.lib(videorenderer.obj) : error LNK2001: unresolved external symbol _glGenBuffersARB@8
答案 0 :(得分:2)
您的链接器报告缺失的符号实际上不包含在您可以链接到Windows中的任何库中。它们是现代OpenGL配置文件和扩展函数,需要在创建OpenGL上下文后在运行时加载。
您报告缺少这些符号表示,在构建您正在使用的videograph
库时,某些事情已经非常严重;或者该图书馆的作者并不关心与其他项目的无缝集成。
请注意,使用像GLEW这样的扩展加载程序包装程序库可能对您没有帮助,因为必须对它们进行初始化,例如:通过调用glewInit
,但库是一种黑盒子,所以你不知道何时调用它。您可以尝试使用GLEW进行链接,并在有OpenGL上下文的位置调用glewInit()
,但是YMMV。
答案 1 :(得分:0)
有一个#ifdef Q_WS_WIN包装器来命名DLL的函数,它没有定义。 Qt在Qt5中更改为Q_OS_WIN,因此使该替换解决了问题。
答案 2 :(得分:-1)
您可能缺少其他一些关键依赖项,请打开属性 - >链接器 - >输入并将其他相关性设置为
加上您目前拥有的任何内容,参考即时消息可能已过时,您可以找到它here