windeployqt5 looking for dll in qt6 bin
-
Hi @Redman,
The most reliable option (since you may not have control over the calling environment, or you may have multiple Qt's in the path, or other scripts might modify it as part of you build processes, etc), is to use the
--qmake <path>option directly to point at theqmakeof the version you want.windeployqtrunsqmakeinternally to read all of the Qt installation details, by running something likeqmake -query(try running that yourself, and see what it shows). So if you don't specify the--qmakeoption, thenwindeployqtruns whateverqmakeit finds in the environment's path.Cheers.
-
As the title says:

I'm trying to deploy a Qt 5.15.2 with
windeployqt.exe. As you can see I set up the cmd session. It's still trying to find Qt5.dlls in Qt6\bin folder. Excplicitly telling to look in Qt5\bin folder did not work as seen. -
@Redman I renamed
C:\Dev\Qt\6.5.2toC:\Dev\Qt\6.5.2hiddenand it worked... Anyone got an idea where I can configurewindeployqt.exeto look into the correct directory?I would guess C:\Dev\Qt\6.5.2 is in your PATH so it's picked up.
-
I would guess C:\Dev\Qt\6.5.2 is in your PATH so it's picked up.
@Christian-Ehrlicher C:\Dev\Qt\6.5.2\msvc2019_64\bin is in my PATH. I did explicitly call the windeployqt in the 5.15.2 folder. I'd really like to know why this did not work
-
@Christian-Ehrlicher C:\Dev\Qt\6.5.2\msvc2019_64\bin is in my PATH. I did explicitly call the windeployqt in the 5.15.2 folder. I'd really like to know why this did not work
'--dir' set the output directory, not a directory to search Qt. So since Qt 6.5.2 is in your path, qmake from there is picked up and it's using the wrong path.
-
Hi @Redman,
The most reliable option (since you may not have control over the calling environment, or you may have multiple Qt's in the path, or other scripts might modify it as part of you build processes, etc), is to use the
--qmake <path>option directly to point at theqmakeof the version you want.windeployqtrunsqmakeinternally to read all of the Qt installation details, by running something likeqmake -query(try running that yourself, and see what it shows). So if you don't specify the--qmakeoption, thenwindeployqtruns whateverqmakeit finds in the environment's path.Cheers.
-
R Redman has marked this topic as solved on
-
Hi @Redman,
The most reliable option (since you may not have control over the calling environment, or you may have multiple Qt's in the path, or other scripts might modify it as part of you build processes, etc), is to use the
--qmake <path>option directly to point at theqmakeof the version you want.windeployqtrunsqmakeinternally to read all of the Qt installation details, by running something likeqmake -query(try running that yourself, and see what it shows). So if you don't specify the--qmakeoption, thenwindeployqtruns whateverqmakeit finds in the environment's path.Cheers.
@Paul-Colby This looked promissing at first.
Qt5 32bit windeployqt does not know the option--qmake. So there is no way of telling it which one to use so it goes with the Qt6 64bit qmake which is found in my PATH. Manually calling the Qt6 32bit windeployqt for a Qt5 32bit application does not work.So for me the only way seems to be to rename the folder to
C:\Dev\Qt6hiddenso it does not use the qmake from PATHBTW:
--qmakeseems to be deprecated and--qpathsshould be used. Later is not recognized -
@Paul-Colby This looked promissing at first.
Qt5 32bit windeployqt does not know the option--qmake. So there is no way of telling it which one to use so it goes with the Qt6 64bit qmake which is found in my PATH. Manually calling the Qt6 32bit windeployqt for a Qt5 32bit application does not work.So for me the only way seems to be to rename the folder to
C:\Dev\Qt6hiddenso it does not use the qmake from PATHBTW:
--qmakeseems to be deprecated and--qpathsshould be used. Later is not recognized