Deploying QT GUI application to Windows Embedded 7 device
-
Hi
I am having problems deploying a QT application to a device running a Windows Embedded 7 OS. I have developed the application on personal PC, I built it in release mode, copied all the dll files into the same folder, so it runs without a problem. But when I copy it to the WE7 device and try to run it, I can see the loading indicator next to the mouse pointer for a few seconds and after that nothing happens at all.
The application is a simple GUI application. As the GUI starts, a TCP client starts in the background and displays a message box when it is able to connect to the host.
I couldn't find any special instructions regarding building and deploying for WE7.
Any ideas what I could go wrong?
Thanks
-
What do you mean by runtime libraries? Where can I find them? I have copied everything that Dependency Walker was complaining about (including Qt5Core).
By the way, forgot to mention, I am building with MinGW 32bit. WE7 is also 32 bit.
I have also run the dependency walker on the WE7 device to see what could be the issue. There are some warnings but no errors. The report can be found here: http://www.filedropper.com/gui_1
Thank you
-
Hi
I did what you said.
When running windeployqt.exe everything is fine except for a warning "Warning: Cannot find Visual Studio installation directory, VCINSTALLDIR is not set." which is weird, because I have the VS installed.
So, when I run the GUI on the WE7 device I get an error "MSVCR120.dll is missing" which I assume is due to the previously mentioned warning. Therefore I manually copy the dll from the VS install directory (Microsoft Visual Studio 12.0\VC\redist\x86\Microsoft.VC120.CRT)
Running the GUI after this throws an error "The procedure entry point _ZN10QArrayData10deallocateEPS_jj could not be loaded in the dynamic link library Qt5Core.dll." Any further suggestions?Thank you
-
Hi, you're almost there, the _ZN10QArrayData10deallocateEPS_jj eror is well known, the Qt DLLs were copied from the wrong directory, see for example Qt forum answer
-
Hi,
thanks for the support.
Still not quite there yet.
You are right, I was using the windeployqt.exe from the wrong directory. Therefore I switched to the same tool but inside the MinGW directory. Running the tool I got an error saying: "unable to find the platform plugin". Found out this is a bug and can be solved adding the --release-with-debug-info flag (can I avoid this?)
However, the procedure entry point error was still there. I manually copied all the dependencies and whatever it was complaining about from the MinGW directory. This means Qt5Core, Qt4GUI, Qt5Widgets, Qt5Network and libwinpthread-1.dll, libstdc++-6.dll, libgcc_s_dw2-1.dll. Also, it was still asking for the msvcr120.dll, msvcp120.dll and vccorlib120.dll, so I copied these too (which is weird to me because as far as I know MinGW has nothing to do with VS, right?).
Now I am back at the beginning. When I run the exe I can see the loading indicator next to the mouse pointer for a few seconds and after that nothing happens at all. Dependency walker only complains about IESHIMS.DLL, SHLWAPI.DLL, IEFRAME.DLL, and a bunch of other things which apparently are all false alarms.So again, I am stuck. Any help and suggestions are highly appreciated. Thanks in advance.
-
Hi @AgentBK,
Let's step back and start from scratch, without relying on tools like windeployqt and Dependency Walker.
First, delete all DLLs from your deployment folder. Then, follow this article carefully: http://wiki.qt.io/Deploy_an_Application_on_Windows -- see the section called "Initial deployment (Quick and dirty)", and do not skip any steps.