Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Qt 5.9.1 building on windows and OpenGL support
Forum Updated to NodeBB v4.3 + New Features

Qt 5.9.1 building on windows and OpenGL support

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
4 Posts 2 Posters 1.8k Views
  • 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.
  • P Offline
    P Offline
    pip010
    wrote on last edited by
    #1

    I use cmake to build qt as ExternProject :

    if(WIN32)
      set(use_jom 1)
      #set(JOM_EXECUTABLE "${QT_EXTERN_BINARY_DIR}/jom.exe")
      set(JOM_EXECUTABLE "jom")
      set(make_cmd "${JOM_EXECUTABLE}")
    else()
      set(QT_BASE_DIR_DEFAULT "$ENV{HOME}/Qt")
      set(make_cmd "make;-j9")
    endif()
    
    
    # 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)
    set(QT_EXTERN_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/${QT_PREFIX}/src/${QT_EXTERN_DIR}" )
    set(QT_EXTERN_BUILD_DIR "${CMAKE_CURRENT_BINARY_DIR}/${QT_PREFIX}/src/${QT_EXTERN_DIR}-build" )
    ExternalProject_Add(qt-5.9.1
      #URL "${EXTERNALS_DIR}/qt/qt-everywhere-opensource-src-5.9.1.zip"
      #URL_MD5 3f2e538ccc468d28bcfdefac96d1e975
      SOURCE_DIR ${QT_EXTERN_BINARY_DIR}
      TIMEOUT 2700 # 45 minutes
      PREFIX ${QT_PREFIX}
      #DOWNLOAD_DIR ${QT_BASE_DIR}/Downloads
      #BUILD_IN_SOURCE 1
      CONFIGURE_COMMAND ${QT_EXTERN_BINARY_DIR}/configure.bat
      -developer-build
      -widgets 
      -gui
      -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
      -no-qml-debug 
      -no-warnings-are-errors 
      -mp 
      -c++std c++11 
      -opensource 
      -confirm-license 
      -debug-and-release 
      -shared
      -platform win32-msvc2017
      -mediaplayer-backend wmf
      -opengl es2
      #-prefix "C:/Qt5/${QT_EXTERN_DIR}"
      -prefix "${QT_EXTERN_BINARY_DIR}-install"
      #CONFIGURE_COMMAND ${CMAKE_COMMAND} -D qt_dir=${QT_EXTERN_BINARY_DIR} -P ${CMAKE_CURRENT_SOURCE_DIR}/ConfigureQt.cmake
      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 qt.io?

    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 :(

    1 Reply Last reply
    0
    • P Offline
      P Offline
      pip010
      wrote on last edited by
      #2

      I've just tried with latest VTK 8.0.1 and again isssues with OpenGL
      QVTKOpenGLWidget.cxx:310

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

      GL_RENDERBUFFER_SAMPLES is undefined :(

      What am I missing?

      1 Reply Last reply
      0
      • P Offline
        P Offline
        pip010
        wrote on last edited by
        #3

        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 ...

        jsulmJ 1 Reply Last reply
        0
        • P pip010

          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 ...

          jsulmJ Offline
          jsulmJ Offline
          jsulm
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @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".

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          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