Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
How do I use qt after building it from source?
Aras last edited by Aras
I am trying to build and use latest Qt5.8 from git source. I want to do an out of source build, so I cloned the source code from git into a folder called
qt5. Then I created a folder next to it called
Qt5.8_Oct24. Inside the
qt5folder I do this:
~$git checkout -b v5.8.0-alpha1 ~$git submodule update --init
And then from inside
Qt5.8_Oct24I configure and build the project like so:
~$../qt5/configure -developer-build -opensource ~$make -j9
This tool a while, and I do not see any errors in the output. However, inside the build directory I only see the following folders:
/Qt5.8_Oct24$ ls Makefile qtandroidextras qtcanvas3d qtdeclarative qtenginio qtimageformats qtpim qtqa qtserialbus qtsvg qtwebsockets txmlpatterns qtactiveqt qtbase qtconnectivity qtdocgallery qtgamepad qtmacextras qtpurchasing qtscxml qtserialport qtwayland qtx11extras
Does that look correct?
qtbase/binfolder I see a number of binary files, including
qmake. What steps do I need to take next to use this new build from both command line and from inside Qt Creator? I would like to be able to access the latest version of examples from within Qt Creator.
Unless you plan to hack on Qt, don't use the -developer-build option.
To configure Qt Creator, add a new Qt version in the Build and Run preferences and then make a Kit with.
One thing you can also to to speed up compilation is to disable building of the tests and examples.
How do I make the examples from the new build available in Qt Creator?
Also I noriced some of the libraries that were present in the source directory were not built and that is causing problem. In particular, the
qtscriptfolder exist in the source but not in the build directory. When I try to build Qt Creator it fails saying
Project ERROR: Unknown module(s) in QT: script. So how do I make sure all libraries included in the
qt5source directory will get built?
Thanks for your quick reply @SGaist !
You have to clone qtscript by hand. It's been deprecated and removed.
@SGaist thanks. It is strange that Qt Creator still depends on
qtscripteven though it is deprecated. You think that is a bug?
The second part of my question was about the examples, any ideas on how I could make the examples from the new build available in Qt Creator?
AFAIK, Qt Creator still uses it a bit.
That part I don't remember. Usually when I need to one of the samples (i.e. the regular expression example) I build it directly or open it from its folder.
qtquickcontrols2? Are those all deprecated too?
Is there a way to build all the modules that ship with
qt5so I don't run into so many dependency issues?
You have here a list of the modules and their state.
QtWebkit as been deprecated and removed.
QtQuick1 as been deprecated and removed
You can still build them from sources but you have to clone them specifically.