This document provides instructions to start using Qt on Windows Embedded Compact 7 (WEC7) environments. Qt is verified in two different environments for WEC7; x86 based Windows Virtual PC and ARMv7 based BeagleBoard XM. For evaluation purposes Qt recommends these environments. Other X86 and ARM based configurations are also supported by Qt Commercial but not tested regularly. MIPS based architectures for WEC7 are currently not supported by Qt Commercial. Since the Qt port is still work in progress there are few limitations.
Detailed instructions for installing WEC7 development environment are given in Installing WEC7 page. In essence the following tools are needed.
In this chapter the Windows Virtual PC is used as a target platform and WEC7 is built based on Enterprise Handheld profile. Detailed instructions for setting up Virtual PC and WEC7 image can be found from Microsoft's Getting started with Virtual CEPC page. Following steps summarizes the most important actions.
To set up Virtual PC and WEC7 follow these steps:
Now there should be WEC7 OS design running in Windows Virtual PC. It should look something like this:

In order to ease environment setup for building Qt against Virtual PC Environment and to faciliate Qt application development for Virtual PC environment without installing Platform Builder, we recommend you to create SDK for WEC7 application development on Virtual PC as intructed on Create an SDK for Application Development.
Rest of this guide assumes that you have built WEC7 SDK from your Virtual PC environment with the vCEPC SDK as a SDK Name
As the Qt Commercial source codes are used the license file needs to be set in place. Copy the license file from your account on customer portal into your home directory (this may be known as the %USERPROFILE% environment variable) and rename it to .qt-license. This renaming process must be done using a command prompt on Windows, not with Windows Explorer. For example on Windows 7, %USERPROFILE% should be something like C:\Users\username
Uncompress the files. Location can be for an example under OS design created in earlier chapter:
C:\WINCE700\OSDesigns\WEC7_vCEPC\WEC7_vCEPC
The Qt contains X86 mkspec for WEC7 platform builder. In order to use template mkspec with your Virtual PC SDK modify qmake.conf:
mkspecs\wince70embedded-x86-msvc2008\qmake.conf
Replace lines:
CE_SDK = Platform Builder CE_ARCH = _TGTCPU
With lines:
CE_SDK = vCEPC SDK CE_ARCH = x86
For building the Qt the Perl needs to be installed and configured to PATH. To check that Perl is correctly installed and configured the following command can be used:
perl -v
After the Perl is verified to work open "Visual Studio Command Prompt". First Configure Qt for WEC7 Virtual PC. Note: Configure needs to be executed in clean Visual Studio command prompt. After setting paths for Qt building to WEC7, the same command prompt cannot be used for configure anymore.
configure -platform win32-msvc2008 -xplatform wince70embedded-x86-msvc2008 -no-accessibility
After successful configure prepare the environment for Qt building as follows:
set path=%CD%\bin;%PATH% checksdk -sdk "vCEPC SDK (x86)" -script qt-wec7-vcepc-env.bat qt-wec7-vcepc-env.bat
After setting the environment variables Qt can be build by calling:
nmake
Currently only manual deployment to WEC7 environments is working. Copy generated DLL, including plugins, and executable to virtual PC. There is one shared folder that both host and Virtual PC can access. Folder can be found from:
%QT_WEC7_OS_DESIGN%\RelDir\VirtualPC_x86_Checked
Create a Qt folder there and copy the whole Qt lib folder and contents of plugins folder there:
mkdir %QT_WEC7_OS_DESIGN%\RelDir\VirtualPC_x86_Checked\Qt xcopy /S lib\* %QT_WEC7_OS_DESIGN%\RelDir\VirtualPC_x86_Checked\Qt\ xcopy /S plugins\* %QT_WEC7_OS_DESIGN%\RelDir\VirtualPC_x86_Checked\Qt\
In addition the MSVC runtime dlls need to be copied to the same place. Copy the files:
copy "C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\ce\dll\x86\msvcr90.dll" %QT_WEC7_OS_DESIGN%\RelDir\VirtualPC_x86_Checked\Qt\ copy "C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\ce\dll\x86\msvcr90d.dll" %QT_WEC7_OS_DESIGN%\RelDir\VirtualPC_x86_Checked\Qt\
This guide uses Qt example called analogclock. Example is located in:
cd examples\widgets\analogclock
To build the Qt example run the following commands from command line in the example folder:
qmake && nmake
Deploy created binary to Virtual PC target:
copy release\analogclock.exe %QT_WEC7_OS_DESIGN%\RelDir\VirtualPC_x86_Checked\Qt\
After the Qt application and all of its dependencies are deployed to WEC7 Virtual PC the example can be ran by opening the command prompt and typing the executable name in the /release - folder. Below is the screenshot of Qt application running in WEC7 Virtual PC.

In this demonstration the BeagleBoard XM is used as a reference hardware. Other WEC7 hardware SDKs can also be used but BeagleBoard specific parts of this user guide needs to be replaced with actual SDK name.
The development environment needs to be set as in Requirements for development environment. In addition the hardware deployment assumes you to have Active Sync software installed for you development host PC. For example the Windows Mobile Device Center can be used.
For this example the free Binary BSP for BeagleBoard XM from Adeneo is used.
Detailed instructions to install BeagleBoard-xM_WEC7 Binary Image to target hardware and BSP for WEC7 can be found from Adeneo website. Here are the main steps for installation:
Now the WEC7 environment should be ready for Qt development on BeagleBoard XM.
Please refer the instructions already stated in Setting up Windows Virtual PC and WEC7
Note: If Qt is wanted to use in both Virtual PC and BeagleBoard environments at the same time, there needs to be two set of Qt source codes in different folders; one built for Virtual PC and another for BeagleBoard.
This quide assumes that the following folder is used:
c:\WEC7_BB\Qt
The latest Qt WEC7 contains only template mkspec for WEC7 target hardware. In order to use template mkspec with BeagleBoard SDK modify qmake.conf:
mkspecs\wince70embedded-armv4i-msvc2008\qmake.conf
Replace the line:
CE_SDK = WEC7_SDK_NAME
With line:
CE_SDK = BeagleBoard-xM - WEC7
This quide assumes that the Qt is already build for Virtual PC. The available SDK names can be listed by calling:
<QTDIR>\bin\checksdk.exe -list
The output of the tool should be something like:
SDK Name: Pocket PC 2003 (ARMV4) SDK Name: Smartphone 2003 (ARMV4) SDK Name: Windows Mobile 5.0 Pocket PC SDK (ARMV4I) SDK Name: Windows Mobile 5.0 Smartphone SDK (ARMV4I) SDK Name: Platform Builder (_TGTCPU) SDK Name: BeagleBoard-xM - WEC7 (ARMv4I) SDK Name: Windows Mobile 6 Professional SDK (ARMV4I) SDK Name: EVM_SDK (ARMv4I)
To use some SDK with Qt, just replace the WEC7_SDK_NAME with the selected SDK name (without architecture, architecture is stored in separate qmake variable CE_ARCH)
To build Qt for WEC7 hardware, open the Visual Studio Command Prompt and configure Qt using the mkspec you modified above.
Note: Configure needs to be executed in clean Visual Studio command prompt. After setting paths for Qt building to WEC7, the same command prompt cannot be used for configure anymore.
configure -platform win32-msvc2008 -xplatform wince70embedded-armv4i-msvc2008 -no-accessibility -exceptions
After successful configure prepare the environment for Qt building as follows:
set PATH=%CD%\bin;%PATH% checksdk -sdk "BeagleBoard-xM - WEC7 (ARMv4I)" -script bb-xm-env.bat bb-xm-env.bat
Build Qt by calling:
nmake
Currently only manual deployment to WEC7 environments is working. Copy generated DLL, including plugins, and executable to memory card where you have WEC7 image for BeagleBoard. First create a Qt folder there and copy the whole Qt lib folder and contents of plugins folder there (Actually *.dlls are enough). The following example assumes that the memory card is visible in windows host as e: drive.
mkdir e:\Qt xcopy /S lib\* e:\Qt xcopy /S plugins\* e:\Qt
This guide uses Qt example called analogclock. Example is located in:
cd examples\widgets\analogclock
To build the Qt example run the following commands from command line in the example folder:
qmake && nmake
Deploy created binary:
copy release\analogclock.exe e:\Qt
Boot the WEC7 in BeagleBoard XM from memory card.
Note: After boot take memory card out and put in back in. Adeneo WEC7 image has a bug that WEC7 needs to be booted first from memory card and then the memory card needs to be taken out put back in in order to get the the memory card visible in WEC7 BeagleBoard Explorer
The example can be ran by opening the command prompt and typing the executables name.
Another way to execute application on target hardware is to use Cetest application.