creating win32 app issue (windows)
-
Please help if you met a similar issue.
My test aim is to create a all-sufficient win32 exe app (for instance, an app with the empty window).
I have windows 7/64, QtCreator 4.11.1 based om Qt5.14.1 (MSCS 2017, 32bit)
Complilers MinGW 32-bit/MinGW 64-bitEverything is OK when I create a 64bit app. I use MinGW 64-bit compliler to make exe app, then I use
d:\Qt\Qt5.14.2_3264\5.14.2\mingw73_64\bin\windeployqt.exe empty_window_tst2exe.exe
I add these additional dlls
libgcc_s_seh-1.dll
libstdc++-6.dll
libwinpthread-1.dllAnd the program works perfectly.
But I need a win32 app, for some reason. So, I create a different project where I use MinGW 32-bit.
I repeated all the operations with
d:\Qt\Qt5.14.2_3264\5.14.2\mingw73_32\bin\windeployqt.exe empty_window_tst322exe.exeBut when I start the 32bit app I have this:
The application was unable to start correctly (0x000007b)If I put the 32bit app empty_window_tst322exe.exe to the bin folder
d:\Qt\Qt5.14.2_3264\5.14.2\mingw73_32\bin
it started OKI couldn't reach more. Maybe someone knows a silver bullet for my situation?
-
@qAlexKo said in creating win32 app issue (windows):
If I put the 32bit app empty_window_tst322exe.exe to the bin folder
Then it looks like, for whatever reason, the
mingw73_32\bin\windeployqt.exe
-created.exe
file is missing at least on dependent file (DLL?) which is present ind:\Qt\Qt5.14.2_3264\5.14.2\mingw73_32\bin
directory. Have a look in there, find out what it is, compare against whatever else you added/got in the one which works for the 64-bit version. If you added additional.dll
s which you list for the 64-bit won't you need to add similar for the 32-bit? -
@JonB said in creating win32 app issue (windows):
Then it looks like, for whatever reason (skipped)
It seems I've catched the problem.
For 64bit:
windeployqt.exe must have libgcc_s_seh-1.dll which located in
x:\Qt\Qt5.14.2_3264\Tools\mingw730_64\bin\libgcc_s_seh-1.dllFor32bit:
There is no libgcc_s_seh-1.dll in
x:\Qt\Qt5.14.2_3264\Tools\mingw730_32\bin
And it was the problem.But 32bit version of libgcc_s_seh-1.dll can be located in the exotice place:
x:\Qt\Qt5.14.2\Tools\mingw730_64\x86_64-w64-mingw32\lib\libgcc_s_seh-1.dll
And when I added it the win32 app started OK.
Thanx, you were if not a silver bulet but a good last push. ;)
-
Another question -- suppose, I have in my project an mqtt module (qtmqtt) installed into QtCreator manually from its source. Must this module be complied by a 64bit compiler only and therefore I cannot use it in my win32 application which I complile in a 32bit compiler?
-
Hi,
You will have to build the module with the Qt version you want to used it with so the correct compiler will be used automatically.
-
@SGaist said in creating win32 app issue (windows):
You will have to build the module with the Qt version you want to used it with so the correct compiler will be used automatically.
Yes, I've done it. I have compliled and installed qtmqtt for mingw32 compiler and it works. The main thing to do is not mix the compiler when you make module for mingw32. In my first attept I did it. I mean the wrong compiler. ;-)
PS: Maybe for someone will be usefull the URL where he describes how to install qtmqtt module if Qtcreator doesn't have it.
https://www.codetd.com/en/article/15656509 (link has been removed ;-()