Building Windows CE applications with the GNU toolset

This document describes how to build applications for a Pocket PC running Windows CE using the GNU tools (gcc, binutils, ..).

The project WinCE-Xcompile, from which this documentation is a part, also provides a binary distribution of the GNU tools that you can use on a x86 Linux PC to build PocketPC applications for a mobile device with an ARM (Intel Xscale) processor.

Understanding the build process

Calling the application

A sample Makefile

P=              arm-wince-pe
PCC=            ${P}-gcc ${CFLAGS} -e_WinMain
WINDRES=        ${P}-windres

CFLAGS=         -DUNICODE -D_UNICODE -DWINE_UNICODE_NATIVE -DWINCE ${INCLUDE}
INCLUDE=        -I/usr/pocketpc/arm-wince-pe/include \
                -I/usr/pocketpc/arm-wince-pe/sys-include/windows

test5.exe:      test5.o test5.rsc
        ${PCC} -o $@ test5.o test5.rsc -lcommctrl

test5.o:        test5.c
        ${PCC} -c $?

test5.rsc:      test5.rc test5.h
        ${WINDRES} $? $@

clean:
        -rm -f *.o *.exe *.ppo *.rsc

Which tools to use

Building LIB files for Windows DLLs

Finding documentation

Details of the binary tools

The binary distribution of this project is a gzipped tar file which should be installed as the content of /usr/pocketpc. The directory /usr/pocketpc/bin should be placed in the search path of the user(s) who wish to use these development tools.

The compiler and its friends are then found as utilities named arm-wince-pe-gcc for the C compiler, similar names for the other tools.

The binary distribution has been assembled from these source distributions :

which were obtained from the Debian servers.

The SDK was modified from this distribution, as described above.