Building Qt Creator from source
-
in this case, you have to follow the documentation. The following pages should give you some insight:
https://doc.qt.io/qtcreator/creator-project-qmake.html
https://doc.qt.io/qtcreator/creator-tool-chains.html
https://doc.qt.io/qtcreator/creator-debuggers.html
https://doc.qt.io/qtcreator/creator-targets.htmlRegards
-
-
I have another idea: you could download the offline installer from https://download.qt.io/official_releases/qtcreator/12.0/12.0.1/ to avoid compiling Creator yourself.
Regards
-
@aha_1980 I downloaded, and building it, but there is slight confusion, please lit some light upon that:
I already built sources using official guide from https://doc.qt.io/qt-6/linux-building.html and its located > /usr/local/Qt-6.4.2;
Pls note I used the same commands:
cmake --build . --parallel
cmake --install .Read me under the link https://download.qt.io/official_releases/qtcreator/12.0/12.0. says:
Linux and macOS
These instructions assume that Ninja is installed and in the
PATH
, Qt Creator
sources are located at/path/to/qtcreator_sources
, Qt is installed in
/path/to/Qt
, and LLVM is installed in/path/to/llvm
.Note that if you install Qt via the online installer, the path to Qt must
include the version number and compiler ABI. The path to the online installer
content is not enough.Note that
/path/to/Qt
doesn't imply the full path depth like:
$USER/Qt/6.2.4/gcc_64/lib/cmake/Qt6
, but only$USER/Qt/6.2.4/gcc_64
.See instructions on how to
get LLVM.```
mkdir qtcreator_build
cd qtcreator_buildcmake -DCMAKE_BUILD_TYPE=Debug -G Ninja "-DCMAKE_PREFIX_PATH=/path/to/Qt;/path/to/llvm" /path/to/qtcreator_sources cmake --build .
**I use command**
cmake -DCMAKE_BUILD_TYPE=Debug -G Ninja "-DCMAKE_PREFIX_PATH=/usr/local/Qt-6.4.2;/usr/lib/llvm-14/" /home/j/tmp/qt-everywhere-src-6.4.2
cmake --build .Confusion: Now I have same building ouput, same time to build as I took to build sources [1200/1000] Building Cxx object... 1. Build sources 2. Build Qt creator Is this way correct? Not sure why is re-building sources, as I already pointed to Qt installed
cmake -DCMAKE_BUILD_TYPE=Debug -G Ninja "-DCMAKE_PREFIX_PATH=/usr/local/Qt-6.4.2;/usr/lib/llvm-14/" /home/j/tmp/qt-everywhere-src-6.4.2
maybe root is not correct or bad syntax?
-
@JacobNovitsky said in Building Qt Creator from source:
I installed qt creator from apt, but version is much lower then needed how to install fresh qt creator from source?
Seriously, don't build Qt Creator and/or Qt from source code if you do not have to. You started this thread failing to build Qt Creator from source, changed to installing the Ubuntu package binaries^^, and then flipped back to building Qt Creator from source (with an unconnected reference to Qt 6.4 libraries built).
^^ While not the latest Qt Creator version it is perfectly able to build Qt projects using any version of Qt 5 or 6 and matching compiler tools you manage to install.
Install the prebuilt, easy-to-install current version of Qt Creator, one or more Qt library versions, and optional add-ons binaries using the Online Installer as @aha_1980 suggested a day back.
-
@JacobNovitsky said in Building Qt Creator from source:
Read me under the link https://download.qt.io/official_releases/qtcreator/12.0/12.0. says:
Nothing, the link is broken.
Carefully compare what the Readme in the Qt Creator12.0.0 source archive file says:
mkdir qtcreator_build cd qtcreator_build cmake -DCMAKE_BUILD_TYPE=Debug -G Ninja "-DCMAKE_PREFIX_PATH=/path/to/Qt;/path/to/llvm" /path/to/qtcreator_sources cmake --build .
with what you say you have typed:
cmake -DCMAKE_BUILD_TYPE=Debug -G Ninja "-DCMAKE_PREFIX_PATH=/usr/local/Qt-6.4.2;/usr/lib/llvm-14/" /home/j/tmp/qt-everywhere-src-6.4.2 cmake --build .
Ask yourself, "Where are the Qt Creator sources?" Qt Creator is not the Qt Libraries.
@JacobNovitsky said in Building Qt Creator from source:
should I build source and qt creator separately?
What does "build source" mean?
I already built all, but I would love to save some time, thats why I'm asking
Clearly you have not built Qt Creator from source code or you would not still be asking how to do it. Save some time by building none of it.
I do not know how to make this clearer:
- Do not build the Qt Creator tool from its source code unless you have a specific reason to do so. A valid reason might be developing changes for Qt Creator itself. A invalid reason would be thinking this was somehow related to the versions of Qt libraries used to build your projects. Install a pre-built Qt Creator IDE and be done with it.
- Do not built Qt libraries from source unless, for some specific reason, you must. Valid reasons might include modifying the library itself (bugs or features), building with unusual options or for an unusual target etc. Otherwise, install a pre-built set of Qt library binaries and be done with it.
- Build your projects from their source code using any compatible Qt library (installed above) with, or without, using Qt Creator.
-
j@j-BOHB-WAX9:/$ find / -type f -name qtcreator 2>/dev/null
/home/j/Downloads/qtcreator_build/bin/qtcreator -