Qt creator cannot successfully start app built with custom built qt bundle on windows
-
I've tried to build qt from source by the following configuration on windows.
E:\build\qt\5.10.0\Src\configure.bat -prefix E:\build\qt\5.10.0\target -opengl desktop -platform win32-g++ -opensource -c++std c++14 -nomake examples -confirm-license
mingw32-make -j4
mingw32-make install -j4It works well. After setup qt.conf file, I can successfully register this qt bundle into qt creator. Qt creator also have no problem in building app with this bundle. However, when trying to run it in qt creator (both debugging & raw running), qt creator will report it cannot find supporting qt DLLs, just like you're trying to run a qt-based app in explorer, when qt DLLs is absent.
The workaround is to manually run windeployqt.exe on built app before running. I've checked environment variables and other settings in building configurations and found no clue.
This is not related to compiler versions as I've tried many versions of mingw-w64, include the official 5.3.0.
I hit this issue in all qt & qt creator versions I've met, roughly since 5.7.0. Does anyone know how to fix this issue? Am I missing anything in configuring/building qt from source, or anything in register qt bundle into qt creator, or anything in building settings?
Thanks a lot for any help. -
Hi and welcome to devnet,
Something strange here, you shouldn't need to fiddle with
qt.conf
after you installed Qt. What made you do it ? -
@SGaist said in Qt creator cannot successfully start app built with custom built qt bundle on windows:
Hi and welcome to devnet,
Something strange here, you shouldn't need to fiddle with
qt.conf
after you installed Qt. What made you do it ?I need to add a qt.conf file to the bin folder with content
[Paths]
Prefix=..
Or I cannot register it in qt creator. -
Did you clone Qt or started from a package ?
-
@SGaist said in Qt creator cannot successfully start app built with custom built qt bundle on windows:
Did you clone Qt or stated from a package ?
I don't know what 'clone' means here. I was compiling Qt from source. I've tried everywhere src package and source code included in an offline installer.