Running Qt application on Windows CE
I have built
QT Qt libraries for Windows CE without cursor support.
The libraries are built using Standard Windows CE 5 SDK.
I have built a
QT Qt test application using the WinCE 5 SDK and QT Qt libraries in Visual studio 2005.
I deployed the application and libraries on device (Windows Embedded CE 6).
The application doesn’t display any error and no window/control is painted on screen.
I gave -qws command line option to it. Still no display.
Kindly, please help me on this.
Thanks in advance.
Edit: QT is QuickTime…
It is very likely the specific Windows CE 6 build of your device does not have some of the dlls needed by Qt.
Windows CE 6 does not have a “standard” build, some devices use a CE 6 build with everything, but (especially on industrial devices) lots of them are compiled with just the dlls and functionalities needed for a specific application (starting with the removal of dlls needed only for retrocompatibility with older CE versions).
Check if the device you use has a custom CE 6 SDK and reconfigure and recompile Qt for it.
For example, to compile Qt for the FriendlyARM board you need the CE 6 SDK you found here:
Or as another example, to compile Qt for the Toradex Colibri boards you need these other SDKs:
The “SDK” is just a collection of include files and binaries “extracted” from the specific CE build for a specific device, is you use a very minimalist SDK it is very likely you will be able to run your application on lots of different devices, but there are no standards for it.
Because of the differences between a build for a device or another, sometimes Qt compilation will fail in unexpected way, for example compiling a previous version of Qt using the Toradex SDK I got compilation errors until I ENABLED cursor support (don’t know why, usually it is required to disable it but on that device it had to be enabled to succesfully compile Qt for it).
I made a Qt Build from the custom SDK for windows ce 6 device.
Still the application displays nothing. When i try executing it from command line i get error stating “cannot execute helloworld.exe”.
Does my application has a problem? Does anything windows specific needs to be put in the application?
Its a simple application as follows:
- #include <QApplication>
- #include <QPushButton>
- #include <windows.h>
- int main( int argc, char **argv )
- QApplication a( argc, argv );
- QPushButton hello( "Hello world!", 0 );
- hello.resize( 100, 30 );
- // a.setMainWidget( &hello );
- return a.exec();
Do i need to modify the application? Coz build has generated DLLs.
I have generated debug build and nothing printed on hyperterminal.
Kindly, please suggest on same.
Thanks in advance.
[edit: code highlighted with @ tags / Denis Kormalev]
I have no experience with WinCE6 yet. But, did you try to build an application for WinCE6 without Qt support? And did it work?
My first thought is that you have not all dlls required on the system. There are certainly the Qt dlls, which you have compiled for WinCE6, but you need other dlls as well. At least in WinCE5.
Hope this might help.
Use the depends.exe utility (in the Common7/utility/bin subfolder of where you installed Visual Studio)
to open the Windows CC executable anch check the dll dependencies it has
(you will need to place the executable and the qt dlls for windows ce in the same folder or else it won’t display the other dlls neede by the qt dlls).
Usually the error above happens when either there are missing dlls on the device or they have the wrong version number.
Another option is to build a debug version (i.e. Qt dlls and application compiled with debugging info) to get more information when the application does not start.
Another thing to check is what C/C++ runtimes are used and in what order they are linked.
When compiling Qt, the “standard” setcepaths.bat usually does not support custom SDKs.
I had to make a custom batch comand setce6paths.bat for the toradex SDK, like this:
- rem Windows CE 6.0 paths for Toradex colibri600 sdk:
- set INCLUDE=C:\Program Files (x86)\Microsoft Visual Studio 8\VC\ce\include;C:\Program Files (x86)\Microsoft Visual Studio 8\VC\ce\atlmfc\include;C:\Program Files (x86)\Windows CE Tools\wce600\Colibri600\Include\Armv4i
- set LIB=C:\Program Files (x86)\Microsoft Visual Studio 8\VC\ce\lib\armv4i;C:\Program Files (x86)\Microsoft Visual Studio 8\VC\ce\atlmfc\lib\armv4i;C:\Program Files (x86)\Windows CE Tools\wce600\Colibri600\Lib\ARMV4I
- rem reset LIBPATH:
- set LIBPATH=C:\Program Files (x86)\Microsoft Visual Studio 8\VC\ce\lib\armv4i;C:\Program Files (x86)\Microsoft Visual Studio 8\VC\ce\atlmfc\lib\armv4i;C:\Program Files (x86)\Windows CE Tools\wce600\Colibri600\Lib\ARMV4I
- set PATH=C:\Program Files (x86)\Microsoft Visual Studio 8\VC\ce\bin\x86_arm;%PATH%
And when compiling Qt I called setce6paths.bat instead of setcepaths.bat
Initially I placed the SDKs paths first on the INCLUDE, LIB and LIBPATH environment variables, but this caused to link the dlls and the executable against the wrong runtimes, I found by trial and error that placing the visual studio (for CE) paths first corrected the problems (but i don’t know if this works on all SDks or if some of them need the SDk paths first).
N.B. If you try this with your sdk, remember to change the “colibri600” paths to those of your sdk.
Sorry for delayed reply. My compilation of Qt build worked.
The QtCore4.dll had dependency on MSVCR80d.dll. That had to be removed.
And i used custom sdk as per target board for Qt compilation.
Instead of setcepaths.bat, i directly invoked checksdk.exe with my custom SDK name. And it worked.
I wrote a small test application to play “.wav” file, which also worked. It had been a tiring 3 and half weeks of effort.
Thanks guys for your help.
hi. I am also trying to develope application for WinCE by using QT network tool.I m totally new for this environment.I want to know how to start developing application for winCE.Can u please help
First read the Qt documentation about the Windows CE platform to get a basic idea of what tools you need and basic information about how to configure and build Qt for a specific Windows CE SDK.
It is highly probable that you will have problems, especially if you build for Windows CE 6.0 or higher, but if you search in this forum discussions with “Windows CE” in the title, it is very likely that you will find the solution you need or the right clue to solve your specific problem.
hiiii……..Thanks for the quick reply
actully i have already read that QT documentation about the Windows CE platform and I have installed that environment. I want to call a web service n get response from that web service.
Is it possible with Qt on WinCE???
If Yes then can any 1 give me some guideline…Any Tutorial to start with it???
I want to call a web service n get response from that web service. Is it possible with Qt on WinCE???
Yes, it basically works as with Qt for Windows for x86 and Linux, provided the Windows CE build on your device has all the OS components required and the Windows CE SDK you use to compile Qt libraries and your application exposes those functionalities.