GlActiveTexture() linker error with Qt5

  • Hey guys,

    I have a problem using glActiveTexture() in Qt5.0.1 Windows. It's the self compiled desktop OpenGL version. I get the following linker error:
    @Texture.obj:-1: Error:LNK2019: unresolved external symbol "_glActiveTexture" in function ""protected: void __thiscall Texture::textureInit(void)" (?textureInitatTextureatatIAEXXZ)".@

    These are my includes:

    #include <QtOpenGL>

    #if defined(_WIN32)
    #include <gl/GLU.h>

    Other texture functions like glBindTexture() work flawlessly.

    Does anyone have an idea how to fix this?

    Thanks in advance!


  • Hi obab,

    I got the same problem some time ago and i solved it like this (I am also using the desktop openGL version):

    Instead of using directly

    u do smth like that
    QOpenGLFunctions f(yourQOpenGLContextInstance);

    Works perfectly in my case!


Log in to reply