Qt not finding include files after qmake and jom
-
Hello fellow Qters.
I am having the following problem after trying to install Qt in a new machine.My process was following:
-
I am using MSVC 2019 and Qt 5.15.2, so I downloaded both like I had in my old machine. I downloaded Qt using the Maintante Tool and have all the dependencies I had in my other laptop.
-
After opening my project, I configured my kits for my deployment, like this:
Notice that the build directory is not in the same level as the source directory, but that is desired and has never been a problem in other machines.
(There is also a clean step, just like the Make build step with the argument "clean".
-
After running qmake, everything looks normal.
-
When Trying to build, I am getting the following warning:
"Error: dependent '..\ ..\ ..\ ..\ ..\Qt\5.15.2\msvc2019_64\include\QtWidgets\QDialog' does not exist.
10:09:22: The process "C:\Qt\Tools\QtCreator\bin\jom\jom.exe" exited with code 2.
Error while building/deploying project XXXXXXX (kit: Desktop Qt 5.15.2 MSVC2019 64bit)
When executing step "Make""-
I have checked that my makefile looks the same as my other machines with these relative paths to the include.
-
All System Environment and Qt Version Variables look also to the same. i. e. libs, includes, etc.
-
If I don't do a shadow build and let Qt build on the orange level, no complains, he builds, but that is not what I want (and cannot run it as a lot of dependencies are missing).
My other machine with same config looks exactly like that. No idea what is happening.
Can someone enlighthen me or know why Qt is complaining / not finding the include files where they are? -
-
Hi and welcome to devnet,
Do you have anything different in the paths such as accented characters ?
-
Hello! Updating from my side.
Thank you @SGaist for your answer, for future people facing the same issue: I did not have any uncommon character in the paths more than underscores.My fix:
I figured with some help and testing deploying to other folder structures that qmake was the problem and complaining.
Placing the whole project one level up (C:\Repos\NewLevel\ ...) fixed the issue and no problem from Qt whatsoever.It is purely a workaround that Qt seems to be ok with. As my version control begins after NewLevel, it is also not an issue. Maybe I will try in the future to take it down one level after some update in Qt, but AFAIK it is not a reported bug.
As I said, other machines with identical Project Strcture using same Qt Version and QtCreator seemed to be okay with that. The Makefiles look also the same in terms of relative paths. -