|  | Home · Overviews · Examples

# Windows CE - Working with Custom SDKs

When working with a custom SDK for Windows CE, Qt provides an easy way to add support for it to your development environment. The following is a tutorial that covers how to create a specification for Qt on Windows CE platforms.

- Creating a Custom Build Specification
- Fine-Tuning Options

## Creating a Custom Build Specification

Create a subdirectory in the `mkspecs` folder of the Qt directory. New specifications for Qt/Windows CE following this naming convention:

        wince<version><SDK-shortcut>-[architecture]-msvc2005

Using this convention makes it possible for qmake to identify that you are building Qt for Windows CE, and will customize the compilation process accordingly.

Create the files `qmake.conf` and `qplatformdefs.h` inside the new specification directory. Take a look at the implementation of the other Windows CE specifications included in the `mkspecs` directory to see what is required to build Qt/Windows CE successfully.

## Fine-Tuning Options

Compared to the desktop versions, Qt/Windows CE needs two additional options:

- CE_SDK specifies the name of the SDK.
- CE_ARCH specifies information about the target architecture.

Following is an example configuration for the Windows Mobile 5 for Pocket PC SDK:

        CE_SDK        = Windows Mobile 5.0 Pocket PC SDK
        CE_ARCH       = ARMV4I

Note:qmake uses this information to build a valid Visual Studio project file. You need to ensure that they are identical to the configuration of the custom SDK, otherwise you might not be able to compile or debug your project with Visual Studio.

Additionally, most Windows CE SDKs use extra compiler options. These can be specified by expanding the `DEFINES` value.

For example, with Windows Mobile 5 for Pocket PC, the `DEFINES` variable is expanded in the following way:

        DEFINES	     += UNDER_CE WINCE _WINDOWS _UNICODE UNICODE _WIN32_WCE=0x501 $$CE_ARCH _ARMV4I_ armv4i _ARM_ ARM _M_ARM ARM _WIN32 __arm__ Q_OS_WINCE_WM QT_NO_PRINTER QT_NO_PRINTDIALOG