- Main Page
- Classes
- Files
- Directories
- Related Pages

# GDAL for Windows CE

## Overview

This document is devoted to give some overview of the GDAL port for Windows CE operating system. The OGR port is the first attempt to get GDAL library working on Windows CE.

## Current Status

Currently, only vector data support is available in form of OGR library port for Windows CE. Next milestone will be to port raster data features to make Windows CE port of GDAL more complete.

List of GDAL features ported to Windows CE:

- CPL library
- Base OGR API
- Subset of OGR data drivers (ogr):
  - Generic
  - Mitab
  - Shape
- WCELibCEx - extensions for C library available on Windows CE operating system
  This is a separate project derived from the work made on GDAL port for Windows CE.

List of features not included in the GDAL port for Windows CE:

- Raster data support
- GEOS has not been ported yet, so OGR for Windows CE compiles without GEOS support (work in progress)
- OGR drivers not listed in the features list above

## Supported Platforms

GDAL port for Windows CE has been tested on Windows Mobile for Pocket PC 2003 operating system (see About Windows CE). It is based on Windows CE 4.2 .NET version. There should be no problems with running it on systems based on latest Windows CE 5.0.

The GDAL port was tested with following compiler for Windows CE devices (see About Visual C++ IDE):

- Microsoft eMbedded Visual C++ 4.0 (SP 4)
- Microsoft Visual C++ 2005

### About Windows CE

Windows CE is one of two embedded operating systems create by Microsoft. The second is Windows XP Embedded. The GDAL port is dedicated to the first one - Windows CE system. It may work on Windows XP Embedded as well but I have not tested it. (If you're interested in differences between those two systems, look at the Comparing Windows CE and Windows XP Embedded by Mike Hall.)

So, remember, in order use GDAL port you will need a mobile device running Windows CE.

Now, a few words about Windows CE and derived systems versions. Usually, users are quite confused about all those different versions of Windows CE and derived systems. In fact, the idea is quite simple. Windows CE is a name of base operating system and can be seen as equivalent of Windows NT for Windows on desktop. All desktop versions like Windows 2000 or XP are still Windows NT systems. Windows CE is highly modular system and can be used as a base operating system by everyone who wants to build his own system. Microsoft provides a few officially configured versions and called them Windows Mobile. Now, you have a few versions of Windows Mobile:

- Windows Mobile for Pocket PC
- Windows Mobile for Smartphone

All those Windows CE derived systems are still Windows CE. So, GDAL port for Windows CE should work on all of them without any problems.

As I said, I tested GDAL port on Windows CE 4.2. That means it will work on:

- Windows Mobile 2003
- Windows Mobile 2003 Second Edition

It's also expected to work on latest Windows Mobile 5.0.

For better understanding of versions of Windows CE, please take a look at these web sites:

- What's the Windows Mobile platform?
- Windows CE Timeline

### About Visual C++ IDE

First, if you have not decided which tool you need, take a look at this Windows Mobile Tool Support Matrix.

Microsoft eMbedded Visual C++ 4.0 (eVC++ 4.0) is available free of charge and can be downloaded from following download website. Also, remember to download and install latest Service Pack (currently, it's SP4).

Recently, Microsoft included C++ compiler for mobile devices into the big Visual C++ compiler, starting from 2005 (8.0) version. So, it seems there will be no new releases of eVC++. In order to use GDAL port for Windows CE with Visual C++ 2005 compiler you will need the Standard Edition or higher because Express Edition does not provide support for Windows CE mobile devices. For more details see this comparison.

## Getting Started

This section explains how to build GDAL for Windows CE as a library. There are not much details about how to use it but it should not be a problem. As explained above, for now, GDAL for Windows CE includes OGR features only, so in order to use it just follow instructions from the OGR API Tutorial. To help you to make the start easier, there are a few test applications based on this tutorial, so try to build and run them. If new features will be added in future, like rasters support, this section will be updated as well.

### Downloading GDAL port sources

GDAL port for Windows CE is available from the official CVS repository. Follow instructions in CVS section on the GDAL download page.

After you checkout GDAL sources, you will get also gdal directory. This directory consists of all files related to Window CE port.

Now, the first thing you should do is to read gdal/wince/README file. There you will find all details about content of gdal/wince directory and building instructions.

### Building GDAL port using eVC++ and makefiles

1. Open command line (cmd.exe) on your Windows box and go to GDAL sources directory. In example to:

           C:\gdal

2. Run configuration script for ARM target. It's default location is:

           C:\Program Files\Microsoft eMbedded C++ 4.0\EVC\wce420\bin\WCEARMV4.BAT

   Now, runs some commands to check if everything is configured well:

           C:\gdal> clarm.exe /?
           Microsoft (R) C/C++ Optimizing Compiler Version 12.20.9615 for ARM
           Copyright (C) Microsoft Corp 1984-2002. All rights reserved.

           C:\gdal> echo %PLATFORM%
           POCKET PC 2003

           C:\gdal> echo %OSVERSION%
           WCE420

3. Build GDAL library:

           C:\gdal> nmake /f makefile.evc4

4. If everything went without any errors you should have following files in gdal root directory (C:):
   - gdalce.lib - static library (PREFERED)
   - gdalce13.dll - Dynamic-Link Library (DLL) (See IMPORTANT note)
   - gdalce_i.exp - export file for DLL
   - gdalce_i.lib - import library for DLL

   Note:
     Currently gdalce13.dll built with NMake seems to be broken. So, if you want to use GDAL for Windows CE as a DLL please use eVC++ 4.0 project file from evc4_gdalce_dll directory at the moment. This issue is known and waiting for fix :-)

### Building GDAL port using eVC++ project files

The easiest way is to build GDAL port for Windows CE using Visual C++ project files. There are two project files available in the gdal/wince directory:

- evc4_gdalce_lib - project file for eMbedded Visual C++ 4.0 to build GDAL port for Windows CE as a static library
- evc4_gdalce_dll - project file for eMbedded Visual C++ 4.0 to build GDAL port for Windows CE as a DLL

So, just open workspace file (.vcw) you want to use in the eVC++ IDE and build it.

Note:
  There are also some project files and test applications provided. Look into the gdal/wince/README file for details.

### Building GDAL port using VC++ 2005 project file

Recently, I also added project file to build GDAL for Windows CE using Visual C++ 2005. This project file is available in the gdal/wince/msvc8_gdalce_lib directory. Sibling test project is available in the gdal/wince/msvc8_gdalce_lib_test.

## How can I help?

I'd like to encourage everyone interested in using GDAL on Windows CE devices to help in its development. Here is a list of what you can do as a contribution to the project:

- You can build GDAL for Windows CE and report problems if you will meet any
- You can try to build new OGR drivers
- You can test GDAL/OGR on different Windows CE devices
- You can write sample applications using GDAL/OGR and announce them on the GDAL mailing list
- If you have found a bug or something is not working on the Windows CE, please report it on the GDAL's Bugzilla

There is also gdal/wince/TODO file where you can find list of things we are going to do.

If you have any comments or questions, please sent them to the gdal-dev@lists.maptools.org mailing list or directly to me on mateusz@loskot.net .

Generated for GDAL by 1.4.5.