What's the difference between Kit "msvc2013_64" and "msvc2013_64_opengl"? My OpenGL project only work with the later Kit

  • When I installed Qt 5.4.2, there are a list of Kit under directory "\Qt\5.4":

    Other kits are for mobile development, so I did not mention here.

    When I tried to build my graphics program with Kit msvc2013_64, it always complains about the link errors:
    GLTexture.obj:-1: error: LNK2019: unresolved external symbol __imp_glBindTexture referenced in function "public: void __cdecl GLTexture::generateMipmap(void)" (?generateMipmap@GLTexture@@QEAAXXZ)
    OpenGLWidget.obj:-1: error: LNK2001: unresolved external symbol __imp_glBindTexture
    GLShaderProgram.obj:-1: error: LNK2001: unresolved external symbol __imp_glBindTexture

    But with Kit msvc2013_64_opengl, everything works great.

    I checked the included header files, the difference is that msvc2013_64 contains QtANGLE, msvc2013_64_opengl does not.
    At the end of this page: http://doc.qt.io/qt-5/configure-options.html
    it also said we can build qt configure with system OpenGL or with ANGLE.

    But for the version after Qt 5.4 (Qt 5.5 - Qt 5.7), I did not find install package with the choice for system OpenGL. With msvc2013_64, the familiar LNK2019 appears again. nightmare lol
    Based on my memory, building from the source code took at least 2 hours (experience with Qt 4.1-4.8). So I wonder if I can still find the lovely qt-opensource-windows-x86-msvc2013_64_opengl-5.7.0.exe for windows installation somewhere?
    (I find the one configure with ANGLE here: https://download.qt.io/archive/qt/5.7/5.7.0/)
    Perhaps I am too bad at searching ...

    I can temporarily live with Qt 5.4.2, but upgrade to a latest version is more ideal.

  • Moderators

    Starting from Qt 5.5 (blog post) there are no separate pre-built packages for ANGLE and desktop OpenGL. Since 5.4 there is a dynamic switch available for choosing OpenGL implementation. The provided binaries use it and dynamically decide at runtime which implementation is available on the user's machine and use that.

    If you want to always use the desktop OpenGL version there are couple of options

    • build Qt with a -opengl desktop switch (takes about 20 minutes with jom on my machine with some modules disabled) (I'd recommend this one)
    • specify an environment variable QT_OPENGL (good enough for development machine but I wouldn't suggest that for deployment)
    • pass a Qt::AA_UseDesktopOpenGL attribute to your QApplication object at the start of the program

  • Thank you so much!
    Very helpful!

  • @Chris-Kawa Thanks for your information.

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.