April 20, 2011

tiger86 tiger86
Lab Rat
4 posts

Running Qt application on Windows CE

Page  
1

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…

17 replies

April 22, 2011

L.MCH L.MCH
Lab Rat
59 posts

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:
http://www.friendlyarm.net/downloads [friendlyarm.net]

Or as another example, to compile Qt for the Toradex Colibri boards you need these other SDKs:
http://files.toradex.com/Colibri/WinCE/SDK/ [files.toradex.com]

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).

April 26, 2011

tiger86 tiger86
Lab Rat
4 posts

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:

  1. #include <QApplication>
  2. #include <QPushButton>
  3. #include <windows.h>
  4.  
  5. int main( int argc, char **argv )
  6. {
  7.  MessageBox(NULL,TEXT("1"),TEXT("2"),MB_OK);
  8.     QApplication a( argc, argv );
  9.  
  10.     QPushButton hello( "Hello world!", 0 );
  11.     hello.resize( 100, 30 );
  12.  
  13. //    a.setMainWidget( &hello );
  14.     hello.show();
  15.     return a.exec();
  16.  
  17. }

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]

April 26, 2011

koahnig koahnig
Gene Splicer
2904 posts

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.

April 27, 2011

L.MCH L.MCH
Lab Rat
59 posts

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:

  1. rem Windows CE 6.0 paths for Toradex colibri600 sdk:
  2.  
  3. 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
  4.  
  5. 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
  6.  
  7. rem reset LIBPATH:
  8.  
  9. 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
  10.  
  11. 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.

May 11, 2011

tiger86 tiger86
Lab Rat
4 posts

Hi,
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.

November 8, 2011

piya_k piya_k
Lab Rat
6 posts

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

November 8, 2011

L.MCH L.MCH
Lab Rat
59 posts
piya_k wrote:
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.

November 9, 2011

piya_k piya_k
Lab Rat
6 posts

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???
Thanks.

November 9, 2011

L.MCH L.MCH
Lab Rat
59 posts
piya_k wrote:
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.

November 11, 2011

piya_k piya_k
Lab Rat
6 posts

Thanks….. I am Working on Windows 7
I have already installed Visual Studio 2008,QT 4.7.4,addin for Visual studio 2008.
What Exatra Things do I need to start my application Development???

November 11, 2011

tiger86 tiger86
Lab Rat
4 posts

Hi,
Check if following link helps you.

http://doc.qt.nokia.com/4.7-snapshot/qtwebkit.html

November 12, 2011

L.MCH L.MCH
Lab Rat
59 posts
piya_k wrote:
What Exatra Things do I need to start my application Development???

You need the SDK for your Windows CE device and the ARM crosscompiler for Visual Studio if you have not installed it yet.

April 8, 2014

Shimmering Shimmering
Lab Rat
12 posts

Hi there,

I encounter the same problem as you described.

You mentioned the solution to remove @QtCore.lib@? How can this lib be removed in a Qt project? I new a Qt WinCE project with Qt-Addin, the QtCore.lib and QtGUI.lib are checked by default and cannot be de-checked.

tiger86 wrote:
Hi, 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.

April 10, 2014

L.MCH L.MCH
Lab Rat
59 posts
Shimmering wrote:
You mentioned the solution to remove @QtCore.lib@? How can this lib be removed in a Qt project? I new a Qt WinCE project with Qt-Addin, the QtCore.lib and QtGUI.lib are checked by default and cannot be de-checked.

He removed the dependency on MSVCR80d.dll from QtCore.dll.

April 10, 2014

Shimmering Shimmering
Lab Rat
12 posts

This is what I want !
Thanks a lot !

With the same tool, here are the results I got:
PI Ordinal Hint Function Entry Point
C N/A 29(0×001D) calloc Not Bound
C N/A 2 (0×0002) _CrtDbgReportW Not Bound
C N/A 6 (0×0006) _CrtSetReportMode Not Bound
C N/A 33(0×0021) strcpy_s Not Bound
C N/A 34(0×0022) strncpy_s Not Bound

Now what I have to do is to find the source code containing these functions in my Qt/src, comment (or delete ?) them and rebuild QtCore.lib, don’t I?

L.MCH wrote:
Shimmering wrote:
You mentioned the solution to remove @QtCore.lib@? How can this lib be removed in a Qt project? I new a Qt WinCE project with Qt-Addin, the QtCore.lib and QtGUI.lib are checked by default and cannot be de-checked.

He removed the dependency on MSVCR80d.dll from QtCore.dll.

Page  
1

  ‹‹ Is Qt suitable for controlling a UAV robot with a single-board-computer?      Error 127 while debugging an example code. ››

You must log in to post a reply. Not a member yet? Register here!