Qt 5.5 build fails using -opengl desktop option on WIndows



  • I'm trying to build Qt 5.5 on WIn 7 using Visual Studio 2015 CE. I need opengl 3 support and I have the NVidia opengl driver and Cg SDK installed. I did the following at a Visual Studio command prompt:

    E:\projects\qt-everywhere-opensource-src-5.5.0>configure -opensource -confirm-license -mp -nomake examples -nomake tests -release -c++11 -no-warnings-are-errors -platform win32-msvc2015 -opengl desktop

    followed by nmake
    I get the following errors:

    cl -c -FIqt_gui_pch.h -Yuqt_gui_pch.h -Fp.pch\release\Qt5Gui_pch.pch -no
    logo -Zc:wchar_t -FS -Zc:strictStrings -O2 -MD -D_HAS_EXCEPTIONS=0 -MP -GR -W3 -
    w34100 -w34189 -w44996 -w44456 -w44457 -w44458 -DUNICODE -DWIN32 -DQT_NO_USING_N
    AMESPACE -DQT_BUILD_GUI_LIB -DQT_BUILDING_QT -D_CRT_SECURE_NO_WARNINGS -D_USE_MA
    TH_DEFINES -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_U
    SE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x0408
    00 -DQT_USE_BUNDLED_LIBPNG -DPNG_ARM_NEON_OPT=0 -DQT_ENABLE_HARFBUZZ_NG -DQT_OPE
    NGL_ES_2 -DQT_OPENGL_ES_2_ANGLE -DQT_NO_EXCEPTIONS -DQT_NO_DEBUG -DQT_CORE_LIB -
    DNDEBUG -I. -I....\include -I....\include\QtGui -I....\include\QtANGLE -I...
    .\include\QtGui\5.5.0 -I....\include\QtGui\5.5.0\QtGui -Itmp -Iimage -I..\3rdpa
    rty\libpng -I..\3rdparty\zlib -I..\3rdparty\harfbuzz-ng\include -I..\3rdparty\zl
    ib -I....\include\QtCore\5.5.0 -I....\include\QtCore\5.5.0\QtCore -I....\incl
    ude\QtCore -I.moc\release -I....\mkspecs\win32-msvc2015 -Fo.obj\release\ @C:\Us
    ers\barry\AppData\Local\Temp\nmC919.tmp
    qopenglcontext.cpp
    kernel\qopenglcontext.cpp(364): error C2065: 'GL_PROXY_TEXTURE_2D': undeclared i
    dentifier
    kernel\qopenglcontext.cpp(370): error C2065: 'QOpenGLFunctions_1_0': undeclared
    identifier
    kernel\qopenglcontext.cpp(370): error C2065: 'gl1funcs': undeclared identifier
    kernel\qopenglcontext.cpp(371): error C2065: 'QOpenGLFunctions_3_2_Core': undecl
    ared identifier
    kernel\qopenglcontext.cpp(371): error C2065: 'gl3funcs': undeclared identifier
    kernel\qopenglcontext.cpp(374): error C2065: 'gl3funcs': undeclared identifier
    kernel\qopenglcontext.cpp(374): error C2065: 'QOpenGLFunctions_3_2_Core': undecl
    ared identifier
    kernel\qopenglcontext.cpp(374): error C2974: 'QOpenGLContext::versionFunctions':
    invalid template argument for 'TYPE', type expected
    e:\projects\qt-everywhere-opensource-src-5.5.0\qtbase\include\qtgui../../src/gu
    i/kernel/qopenglcontext.h(181): note: see declaration of 'QOpenGLContext::versio
    nFunctions'
    kernel\qopenglcontext.cpp(376): error C2065: 'gl1funcs': undeclared identifier
    kernel\qopenglcontext.cpp(376): error C2065: 'QOpenGLFunctions_1_0': undeclared
    identifier
    kernel\qopenglcontext.cpp(376): error C2974: 'QOpenGLContext::versionFunctions':
    invalid template argument for 'TYPE', type expected
    e:\projects\qt-everywhere-opensource-src-5.5.0\qtbase\include\qtgui../../src/gu
    i/kernel/qopenglcontext.h(181): note: see declaration of 'QOpenGLContext::versio
    nFunctions'
    kernel\qopenglcontext.cpp(378): error C2065: 'gl1funcs': undeclared identifier
    kernel\qopenglcontext.cpp(378): error C2065: 'gl3funcs': undeclared identifier
    kernel\qopenglcontext.cpp(380): error C2065: 'gl1funcs': undeclared identifier
    kernel\qopenglcontext.cpp(381): error C2065: 'gl1funcs': undeclared identifier
    kernel\qopenglcontext.cpp(381): error C2227: left of '->glGetTexLevelParameteriv
    ' must point to class/struct/union/generic type
    kernel\qopenglcontext.cpp(381): note: type is 'unknown-type'
    kernel\qopenglcontext.cpp(381): error C2065: 'GL_TEXTURE_WIDTH': undeclared iden
    tifier
    kernel\qopenglcontext.cpp(383): error C2065: 'gl3funcs': undeclared identifier
    kernel\qopenglcontext.cpp(383): error C2227: left of '->glGetTexLevelParameteriv
    ' must point to class/struct/union/generic type
    kernel\qopenglcontext.cpp(383): note: type is 'unknown-type'
    kernel\qopenglcontext.cpp(383): error C2065: 'GL_TEXTURE_WIDTH': undeclared iden
    tifier
    kernel\qopenglcontext.cpp(395): error C2065: 'gl1funcs': undeclared identifier
    kernel\qopenglcontext.cpp(396): error C2065: 'gl1funcs': undeclared identifier
    kernel\qopenglcontext.cpp(396): error C2227: left of '->glGetTexLevelParameteriv
    ' must point to class/struct/union/generic type
    kernel\qopenglcontext.cpp(396): note: type is 'unknown-type'
    kernel\qopenglcontext.cpp(396): error C2065: 'GL_TEXTURE_WIDTH': undeclared iden
    tifier
    kernel\qopenglcontext.cpp(398): error C2065: 'gl3funcs': undeclared identifier
    kernel\qopenglcontext.cpp(398): error C2227: left of '->glGetTexLevelParameteriv
    ' must point to class/struct/union/generic type
    kernel\qopenglcontext.cpp(398): note: type is 'unknown-type'
    kernel\qopenglcontext.cpp(398): error C2065: 'GL_TEXTURE_WIDTH': undeclared iden
    tifier
    NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 14.0
    \VC\BIN\cl.EXE"' : return code '0x2'
    Stop.
    NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 14.0
    \VC\BIN\nmake.exe"' : return code '0x2'
    Stop.
    NMAKE : fatal error U1077: 'cd' : return code '0x2'
    Stop.
    NMAKE : fatal error U1077: 'cd' : return code '0x2'
    Stop.
    NMAKE : fatal error U1077: 'cd' : return code '0x2'
    Stop.

    It builds to completion if I don't add the -opengl desktop option to configure. Any ideas on what is wrong?



  • I have exactly the same problem, did you correct it.


  • Moderators

    i am not sure if it is required for building, but have you set the QTDIR environment variable before calling nmake?
    (It should point the qtbase directory)



  • No, the environment variable are set. I think the problem was because I rebuild Qt in the same folder for two times. I am trying to to rebuild from a Qt new extracted source.


Log in to reply
 

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