qmake link error after delete qt-everywhere-src
-
Hello everyone.
I tried to build from source yesterday (running configure.bat with "-prefix "D:\qt""), and it succeeded. Both qmake and cmake work.
But today I deleted the qt-everywhere-src folder(I placeed it in C:\) which is approximately 100+ GB, and then I got an error. I think it should link libs in D:\qt\xxxxx, but it didn't! (I created this demo project with QT VS tools and didn't change any options.)
I created a new project with cmake and set(CMAKE_PREFIX_PATH "D:\qt"), it still works!
How can I fix this problem to let qmake links to the right libs?
-
Hello everyone.
I tried to build from source yesterday (running configure.bat with "-prefix "D:\qt""), and it succeeded. Both qmake and cmake work.
But today I deleted the qt-everywhere-src folder(I placeed it in C:\) which is approximately 100+ GB, and then I got an error. I think it should link libs in D:\qt\xxxxx, but it didn't! (I created this demo project with QT VS tools and didn't change any options.)
I created a new project with cmake and set(CMAKE_PREFIX_PATH "D:\qt"), it still works!
How can I fix this problem to let qmake links to the right libs?
@okoknotok Did you also do "make install" after building Qt?
-
@okoknotok Did you also do "make install" after building Qt?
-
@jsulm I remember I used "ninja install" or something like that. and it works when i use CMake to build new project. Only qmake links to wrong library folder. So I'm wondering if something is wrong with the configurations of my qmake.
@okoknotok Did you try complete rebuild of your app:
- Delete build folder
- Run qmake
- Build
-
@okoknotok Did you try complete rebuild of your app:
- Delete build folder
- Run qmake
- Build
@jsulm Yes.
I try to create a new project again. But I check Project | Properties | Configuration Properties | Linker | Command Line | All Options this time, and I find something interesting
It links same libs from different folder!
Then I check the Linker Input, I think I find the root of the problem.
But Why? Where it inherits from? The Qt_LIBS Macro is autogenerated. How did it find C:\xxxxx? I only add a qt version for QT VS Tools in D:\xxxxx from very begining.UPDATE: I grep qt-everywhere-src in D:\qt, It is mainly found in *.prl and *.pri files.
-
I grep qt-everywhere-src in D:\qt, It is mainly found in *.prl and *.pri files.
So I check the content and compare it with offical release.
LEFT is installed using online-installer.
RIGHT is my build.As you can see, The first line was intentionally deleted.
Is this the root of the problem?