Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Game Development
  4. GlActiveTexture() linker error with Qt5
Qt 6.11 is out! See what's new in the release blog

GlActiveTexture() linker error with Qt5

Scheduled Pinned Locked Moved Game Development
2 Posts 2 Posters 3.9k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • O Offline
    O Offline
    obab30
    wrote on last edited by
    #1

    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:
    @
    #define GL_GLEXT_PROTOTYPES

    #include <QtOpenGL>

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

    Other texture functions like glBindTexture() work flawlessly.

    Does anyone have an idea how to fix this?

    Thanks in advance!

    obab

    1 Reply Last reply
    0
    • S Offline
      S Offline
      Seraph
      wrote on last edited by
      #2

      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
      @
      glActiveTexture(GL_TEXTURE0);
      @

      u do smth like that
      @
      QOpenGLFunctions f(yourQOpenGLContextInstance);
      f.glActiveTexture(GL_TEXTURE0);
      @

      Works perfectly in my case!

      Greetings

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved