Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Can't build qt5 on win8 with -opengl desktop ?
Qt 6.11 is out! See what's new in the release blog

Can't build qt5 on win8 with -opengl desktop ?

Scheduled Pinned Locked Moved General and Desktop
8 Posts 4 Posters 9.3k 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.
  • S Offline
    S Offline
    Sushisource
    wrote on last edited by
    #1

    Hi all,

    Trying to build qt5 from source, but it fails to build QtGui for what looks like an inability to load opengl functions. I have the win 8 sdk, using the win32-msvc2012 spec. Latest nvidia drivers. I don't think I'm doing anything wrong - is this just still unsupported at this point? I'd really love to get full opengl support working on windows.

    This is my configure command:
    @configure -nomake demos -nomake examples -c++11 -opengl desktop -saveconfig lastused -nomake webkit -platform win32-msvc2012@

    And here's the compiler error:

    @ cl -c -FIqt_gui_pch.h -Yuqt_gui_pch.h -Fp.obj\debug_shared\Qt5Guid_pch.pch -nologo -Zm200 -Zc:wchar_t -Zi -MDd -W3 -w34100 -w34189 -GR -DUNICODE -DWIN32 -DQT_NO_USING_NAMESPACE -DQT_BUILD_GUI_LIB -DQT_BUILDING_QT -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRING
    BUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x040800 -D_USE_MATH_DEFINES -DQT_USE_BUNDLED_LIBPNG -DQT_OPENGL_ES_2 -DQT_OPENGL_ES_2_ANGLE -DQT_CORE_LIB -DQT_NO_EXCEPTIONS -I"....\include" -I"....\include\QtGui" -I"....\include\QtGui\5.0.0" -I"....\include\QtGui\5.0.0\QtGui" -I
    "tmp" -I"image" -I"..\3rdparty\libpng" -I"..\3rdparty\zlib" -I"..\3rdparty\zlib" -I"....\include\QtCore" -I"....\include\QtCore\5.0.0" -I"....\include\QtCore\5.0.0\QtCore" -I".moc\debug_shared" -I"....\mkspecs\win32-msvc2012" -Fo.obj\debug_shared\ @C:\Users\Spencer\AppData\Local\Temp\nm94CD.tmp
    qplatformopenglcontext.cpp
    qopenglcontext.cpp
    e:\libs\qt-everywhere-opensource-src-5.0.0\qtbase\include\qtgui../../src/gui/opengl/qopenglfunctions.h(593) : error C2039: 'glClearDepth' : is not a member of 'global namespace'' (kernel\qplatformopenglcontext.cpp) e:\libs\qt-everywhere-opensource-src-5.0.0\qtbase\include\qtgui\../../src/gui/opengl/qopenglfunctions.h(593) : error C3861: 'glClearDepth': identifier not found (kernel\qplatformopenglcontext.cpp) e:\libs\qt-everywhere-opensource-src-5.0.0\qtbase\include\qtgui\../../src/gui/opengl/qopenglfunctions.h(715) : error C2039: 'glDepthRange' : is not a member of 'global namespace'' (kernel\qplatformopenglcontext.cpp)
    e:\libs\qt-everywhere-opensource-src-5.0.0\qtbase\include\qtgui../../src/gui/opengl/qopenglfunctions.h(715) : error C3861: 'glDepthRange': identifier not found (kernel\qplatformopenglcontext.cpp)
    e:\libs\qt-everywhere-opensource-src-5.0.0\qtbase\src\gui\opengl\qopenglfunctions.h(593) : error C2039: 'glClearDepth' : is not a member of 'global namespace'' (kernel\qopenglcontext.cpp) e:\libs\qt-everywhere-opensource-src-5.0.0\qtbase\src\gui\opengl\qopenglfunctions.h(593) : error C3861: 'glClearDepth': identifier not found (kernel\qopenglcontext.cpp) e:\libs\qt-everywhere-opensource-src-5.0.0\qtbase\src\gui\opengl\qopenglfunctions.h(715) : error C2039: 'glDepthRange' : is not a member of 'global namespace'' (kernel\qopenglcontext.cpp)
    e:\libs\qt-everywhere-opensource-src-5.0.0\qtbase\src\gui\opengl\qopenglfunctions.h(715) : error C3861: 'glDepthRange': identifier not found (kernel\qopenglcontext.cpp)
    kernel\qopenglcontext.cpp(189) : error C2065: 'GL_PROXY_TEXTURE_2D' : undeclared identifier
    kernel\qopenglcontext.cpp(194) : error C2065: 'GL_TEXTURE_WIDTH' : undeclared identifier
    kernel\qopenglcontext.cpp(194) : error C3861: 'glGetTexLevelParameteriv': identifier not found
    kernel\qopenglcontext.cpp(205) : error C2065: 'GL_TEXTURE_WIDTH' : undeclared identifier
    kernel\qopenglcontext.cpp(205) : error C3861: 'glGetTexLevelParameteriv': identifier not found
    NMAKE : fatal error U1077: 'E:\apps\vs2012\VC\BIN\cl.EXE' : return code '0x2'
    Stop@

    1 Reply Last reply
    0
    • JKSHJ Offline
      JKSHJ Offline
      JKSH
      Moderators
      wrote on last edited by
      #2

      Hello,

      I managed to compile Qt 5 on Win 8 x64, using MSVC 2012 Express, the latest source from Gitorious, and these flags:

      @
      configure -developer-build -opensource -opengl desktop -nomake examples -nomake tests
      @

      Questions:

      Will it work if you omit -saveconfig lastused' and -platform win32-msvc2012'? (I'm not sure what the former is for; the latter is unnecessary)

      What version of OpenGL does your graphics card support?

      Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

      1 Reply Last reply
      0
      • S Offline
        S Offline
        Sushisource
        wrote on last edited by
        #3
        1. Nope. The first just saves my args so I don't have to remember. The second is indeed unnecessary I guess, but it makes no difference if I omit it.
        2. The latest. 4.3 or whatever it is. I have a new Nvidia 660ti

        It seems like I'm missing some sort of opengl header, like glext.h or something. But as far as I can tell the QT build doesn't expect me to have any pre-exising dependencies besides the windows sdk for this.

        1 Reply Last reply
        0
        • JKSHJ Offline
          JKSHJ Offline
          JKSH
          Moderators
          wrote on last edited by
          #4

          Hmm... hard to tell.

          Some more attempts:

          • Give my configuration a shot (just rename your qtwebkit and qtwebkit-examples-and-demos folders to avoid building them)
          • Do you have Perl and Python installed?

          I'm using an ATI Radeon HD 7770; maybe nVidia's drivers are missing something.

          Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

          1 Reply Last reply
          0
          • Chris KawaC Offline
            Chris KawaC Offline
            Chris Kawa
            Lifetime Qt Champion
            wrote on last edited by
            #5

            I've built it successfully with similar configure options with GTX 570 so it's not nvidia drivers problem.
            -But maybe it's a problem of missing nvidia drivers? Did you install drivers from nvidia site yourself or are you using those defaults provided by windows?- (sorry, I just re-read your first post and see you're using latest drivers)
            Other shot in the dark is that you have something conflicting in your include path like GLUT or GLEW?

            1 Reply Last reply
            0
            • S Offline
              S Offline
              Sushisource
              wrote on last edited by
              #6

              Well, I just used the qt5 git repository instead of the source archive linked on the download page and now everything works. So, future googlers, use the repo.

              Thanks for the attempts all!

              1 Reply Last reply
              0
              • M Offline
                M Offline
                mfeemster
                wrote on last edited by
                #7

                Sushisource, I am having the same exact problem as you and can't figure it out. It seems like there are quite a few OpenGL symbols missing (that are normally defined in glew).

                You said you pulled qt5 and it worked? I tried that and it didn't work, so I was wondering if you pulled a specific branch? Any help would be greatly appreciated. Thanks.

                github.com/mfeemster/fractorium/wiki

                1 Reply Last reply
                0
                • M Offline
                  M Offline
                  mfeemster
                  wrote on last edited by
                  #8

                  I pulled the stable branch of qt5 and that seemed to fix it:

                  git clone -b stable https://git.gitorious.org/qt/qt5.git qt5stable
                  perl init-repository --no-webkit

                  Open Visual Studio 2010 x64 command prompt:
                  configure -release -opensource -shared -opengl desktop -platform win32-msvc2010 -nomake examples -nomake demos -nomake tests
                  jom.exe -j 4

                  Everything built. I hope that might help others who are having trouble.

                  github.com/mfeemster/fractorium/wiki

                  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