Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
After build from source, and install, getting errors trying to use it in Qt Creator
JonathanA last edited by JonathanA
After I do the "configure", "jom" and "jom install" steps, I get a Qt build in the -prefix folder. But if I try to manually create a Qt kit using that folder, I always get a
Qt version is not properly installed. please run make install
Error in the Qt Versions tab of the Manage Kits dialog inside of Qt Creator. If I expand it to see the details, it says "Invalid Qt Version".
Am I supposed to move that somewhere so Qt Creator is happy? What is it looking for exactly that it isn't find? I would also like to share this build with my fellow developers. Can I just zip the folder up and give it to them to unzip onto their hard drive?
Mind you, I am getting the aforementioned install errors (see my previous post). But as it is complaining about files already there, I'm thinking that isn't my problem here.
Did you first add a new Qt version using your self built Qt ?
What parameters did you pass exactly to configure ?
Yes, this is the error I'm getting when I try to Add.. from the Qt Versions tab. Here's my configure line (it's a big one because I'm skipping a bunch of modules):
%_ROOT%\configure -prefix %_ROOT%\..\5.12.1-32-release -nomake examples -nomake tests -skip qtandroidextras -skip qtgamepad -skip qtmacextras -skip qtquickcontrols -skip qt3d -skip qtcanvas3d -skip qtx11extras -skip qtactiveqt -skip qtcharts -skip qtdatavis3d -skip qtpurchasing -skip qtquickcontrols2 -skip qtvirtualkeyboard -skip qtwayland -opensource -opengl dynamic -confirm-license
And I'm trying to use the qmake found in the 5.12.1-32-release/bin folder.
What do you get if your run qmake directly from the command line ?
So if I run this:
F:\Qt\5.12.1\msvc2017_32\bin>qmake --version QMake version 3.1 Using Qt version 5.12.1 in c:/5.12.1-32-release/lib
that looks like the problem. As you can see, the qmake is in a different folder than where it is looking. It should be looking in F:\Qt\5.12.1\msvc2017_32\lib, because I moved it to a different computer. Is there anyway to have it so Qt isn't looking in a hardcoded path, but rather relative (which was how I thought it always worked).
I meant running qmake from your custom Qt build.
@SGaist yeah, sorry the path looked weird, I moved it around. That is my custom Qt build qmake.
And there's your problem, you can't just move your Qt installation around like that. There are paths hard coded in qmake. IIRC there's a relocate tool but I don't remember its exact name.
Yup, that's it. Turns out I can add a qt.conf file "next" to the qmake.exe with the following in it:
[Paths] Prefix = f:/5.12.1-32-release
And now I get:
F:\5.12.1-32-release\bin>qmake --version QMake version 3.1 Using Qt version 5.12.1 in f:/5.12.1-32-release/lib
And Qt Creator is very happy.