0

This is in Visual Studio 2010. I can't find any documentation anywhere that says which library contains these functions. I'm already listing these libraries as dependencies:

    Qt5OpenGL.lib;Qt5Gui.lib;Qt5Widgets.lib;qtmaind.lib;Qt5Cored.lib;Qt5Guid.lib;Qt5OpenGLd.lib;Qt5Sqld.lib;Qt5Networkd.lib;opengl32.lib;glu32.lib

I appreciate any help here, as I'm stuck.

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

3 Answers3

2

The symbols your linker reports missing are actually not contained in any library you could link to in Windows. They're modern OpenGL profile and extension functions which need to be loaded at runtime after a OpenGL context has been created.

That you get reported those symbols missing indicates, that something has been messed up very seriously when building the videograph library you're using; or the author of that library didn't care much for seamless integration into other projects.

Note that using an extension loader-wrapper library like GLEW may not help you there, because those must be initialized, e.g. by calling glewInit, but libraries are kind of black boxes, so you don't know when to call it. You can try linking with GLEW and call glewInit() at a point where you have an OpenGL context, but YMMV.

datenwolf
  • 159,371
  • 13
  • 185
  • 298
  • Ok, I see what you're saying, and thanks. I've since realized that the offending calls are in another library, and that library is linking the .obj in question just fine. The problem is that the videograph library has a dependency on the other library, and is trying to static link these calls for some reason. Very confusing. – waterrockets Apr 23 '14 at 16:03
  • I figured this out. There was an #ifdef Q_WS_WIN wrapper to name the functions for the DLL, and it was not defined. Qt changed to Q_OS_WIN in Qt5, so making that substitution fixed the problem. – waterrockets May 02 '14 at 20:24
0

There was an #ifdef Q_WS_WIN wrapper to name the functions for the DLL, and it was not defined. Qt changed to Q_OS_WIN in Qt5, so making that substitution fixed the problem.

-1

You might be missing some other key dependencies, open up Properties -> Linker -> Input and set Additional Dependencies to

  • opengl32.lib
  • glu32.lib
  • delayimp.lib
  • imm32.lib
  • winmm.lib

plus whatever you currently have, the reference im using might be dated though, you can find it here

Syntactic Fructose
  • 18,936
  • 23
  • 91
  • 177
  • 1
    Those symbols, OPs build is missing you'll find in no `.lib` at all in Windows. They're modern profile OpenGL functions, accessible only through the OpenGL extension mechanism. – datenwolf Apr 19 '14 at 10:49