Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Build Qt from source



  • Hello,
    Trying to build qt from source : http://doc.qt.io/qt-5/windows-requirements.html#building-from-source
    i have a doubt about this :

    ANGLE depends on these extra tools from the GnuWin32 and Win flex-bison projects, which are provided for your convenience in the gnuwin32/bin folder:
    
        GPerf
        Bison, Flex
    
    The gnuwin32/bin folder should be added to the PATH variable.
    

    i dl / installed GPerf from here http://gnuwin32.sourceforge.net/packages.html
    That created a folder c:/gnuwin32/bin ; but there are only 2 .dll files inside bin.
    i also downloaded Bison, Flex

    Do i have to put Bison & Flex inside c:/gnuwin32/bin ?

    Also in Step 4 i have to do :
    configure -debug -nomake examples -nomake tests -skip qtwebengine -opensource

    what is 'configure' it is not recognized as command in windows command prompt

    Last thing i don't understand : when i install qt from online installer, it comes with c:/qt/VERSION/Mingw/ .. but i cant use this for compile Qt from source, correct me if i'm wrong. Do I have to download minGw and install it independetly ?

    I apologize for this silly questions.


  • Moderators

    Angle is not necessary anymore. You can safely skip that step.

    Besides, the message says which are provided for your convenience in the gnuwin32/bin folder so you don't have to download them on your own, they should be already in Qt source you downloaded.

    Last thing i don't understand : when i install qt from online installer, it comes with c:/qt/VERSION/Mingw/ .. but i cant use this for compile Qt from source, correct me if i'm wrong. Do I have to download minGw and install it independetly ?

    You can use that compiler.

    Although on Windows it's probably the best (and easiest) to use MSVC compiler.

    BTW. The most in-dept guide to building Qt from source is https://wiki.qt.io/Building_Qt_5_from_Git The only downside is that is is based on git instead of using (much simpler) Qt archive packages.

    configure -debug -nomake examples -nomake tests -skip qtwebengine -opensource
    what is 'configure' it is not recognized as command in windows command prompt

    So you opened cmd.exe, changed directory to root directory of Qt source code and then run configure, right?



  • @sierdzio thank you very much,
    @sierdzio said in Build Qt from source:

    So you opened cmd.exe, changed directory to root directory of Qt source code and then run configure, right?

    yes, i finnaly found configure.bat sorry

    @sierdzio said in Build Qt from source:

    Although on Windows it's probably the best (and easiest) to use MSVC compiler.

    If i use MSVC for building Qt, i am still allowed to use Mingw for the my applications development right ? (silly one)

    I will follow the guide you suggested.
    THX



  • @sierdzio said in Build Qt from source:

    Angle is not necessary anymore. You can safely skip that step.

    after i did

    configure -debug -nomake examples -nomake tests -skip qtwebengine -opensource -opengl es2
    

    I have a warning :
    Using openGL ES 2.0 on Windows without ANGLE.
    The build will most likely fail.
    Specify -opengl desktop to use regular OpenGL



  • @LeLev ,

    mingw32-make

    In file included from ..\..\include/QtGui/qopengl.h:1,
                     from ..\..\include/QtGui/../../src/gui/kernel/qopenglcontext.h:60,
                     from ..\..\include/QtGui/qopenglcontext.h:1,
                     from C:/Qt/5.11.1/qt-everywhere-src-5.11.1/qtbase/src/gui/kernel/qplatformintegration.h:56,
                     from ..\..\include\QtGui\5.11.1\QtGui/qpa/qplatformintegration.h:1,
                     from accessible\qaccessible.cpp:52:
    ..\..\include/QtGui/../../src/gui/opengl/qopengl.h:111:13: fatal error: GLES2/gl2.h: No such file or directory
     #   include <GLES2/gl2.h>
    

  • Moderators

    @LeLev said in Build Qt from source:

    If i use MSVC for building Qt, i am still allowed to use Mingw for the my applications development right ? (silly one)

    No, MinGW and MSVC builds are not compatible.

    I have a warning :
    Using openGL ES 2.0 on Windows without ANGLE.

    Why are you building with OpenGL ES support? On desktop you should use desktop OpenGL/ DX.



  • Hi,
    @sierdzio said in Build Qt from source:

    Why are you building with OpenGL ES support? On desktop you should use desktop OpenGL/ DX.

    All i want is to test WebGL


  • Moderators

    Just use Linux, it will be much easier.

    If you do decide to stick with Windows, don't forget to force the threaded render loop:

    Note: The plugin only works using the Threaded Render Loop. If you use Windows or a platform using a different render loop ensure you set QSG_RENDER_LOOP environment variable to threaded
    

    https://blog.qt.io/blog/2017/07/07/qt-webgl-streaming-merged/



  • can i use linux virtual machine, install qt on it and use mingw for build applications for windows ?


  • Moderators

    @LeLev said in Build Qt from source:

    can i use linux virtual machine, install qt on it and use mingw for build applications for windows ?

    No, MinGW and GCC binaries are not compatible.



  • @sierdzio many thank you for help. I will try to build qt from sources during my hollydays as i already lost to much time trying


Log in to reply