Important: Please read the Qt Code of Conduct -

Qt 5.9.1 building on windows and OpenGL support

  • I use cmake to build qt as ExternProject :

      set(use_jom 1)
      #set(JOM_EXECUTABLE "${QT_EXTERN_BINARY_DIR}/jom.exe")
      set(JOM_EXECUTABLE "jom")
      set(make_cmd "${JOM_EXECUTABLE}")
      set(make_cmd "make;-j9")
    # Make command : use something that handles parallel builds for best
    # Qt build time
    set(QT_EXTERN_DIR qt-5.9.1)
    set(QT_PREFIX qt)
      #URL "${EXTERNALS_DIR}/qt/"
      #URL_MD5 3f2e538ccc468d28bcfdefac96d1e975
      TIMEOUT 2700 # 45 minutes
      #DOWNLOAD_DIR ${QT_BASE_DIR}/Downloads
      -skip webengine 
      -skip virtualkeyboard 
      -skip charts 
      -skip webchannel 
      -skip purchasing 
      -skip wayland 
      -skip webview
      -skip websockets
      -skip declarative 
      -skip webkit
      -skip connectivity
      -skip location
      -skip gamepad
      -skip remoteobjects
      -skip script
      -skip sensors
      -skip serialbus
      -skip serialport
      -skip speech
      -nomake examples 
      -nomake tests
      -c++std c++11 
      -platform win32-msvc2017
      -mediaplayer-backend wmf
      -opengl es2
      #-prefix "C:/Qt5/${QT_EXTERN_DIR}"
      -prefix "${QT_EXTERN_BINARY_DIR}-install"
      BUILD_COMMAND ${make_cmd}
      INSTALL_COMMAND "${CMAKE_COMMAND}" -E chdir "${QT_EXTERN_BUILD_DIR}" jom install

    It all builds fine with the exception that it always installs in /usr/local ( the default Linux path WTF!?)
    I read the install step is missing in Windows? Then how to create the installers from

    Anyway, my main problem is when I try to buil VTK with Qt support, then it miserably fails while it work fine against installed Qt5.7 :(

    C:\usr\local\Qt-5.9.1\include\QtGui/qopengles2ext.h(22): error C4430: missing type specifier - int assumed.
    more than 300 errors more...

    Indeed that header include no other, yet it defines this:

    typedef khronos_int64_t GLint64;

    of course khronos_int64_t is nowhere defined :(

    I've installed DirectX and tried with any possible -opengl flag during configuration. I have followed all the instruction step.

    Again, qt builds bbut it seems my Opengl binding is broken, I am sure it is not VTK issue :(

  • I've just tried with latest VTK 8.0.1 and again isssues with OpenGL

      f->glGetRenderbufferParameteriv(GL_RENDERBUFFER, GL_RENDERBUFFER_SAMPLES, &samples);

    GL_RENDERBUFFER_SAMPLES is undefined :(

    What am I missing?

  • has anyone managed to build Qt with OpenGL support in windows if yes please explain ...
    how do the qt guys produce the official build, please post step by step instructions ...

  • Lifetime Qt Champion

    @pip010 said in Qt 5.9.1 building on windows and OpenGL support:

    how do the qt guys produce the official build, please post step by step instructions ...

    Why do you ask this here? This forum is for Qt users not for "qt guys".

Log in to reply