|  | Home · All Classes · Main Classes · Grouped Classes · Modules · Functions |

# Windows CE - Using shadow builds

While developing for Windows CE you might want to compile a version of Qt for several different platforms and SDKs. In order to create those different builds of Qt you do not have to copy the whole Qt package or the Qt source. You are able to create multiple Qt builds from a single source tree. Such builds are called shadow builds.

Basicly a shadow build is created by calling configure.exe from a different directory.

To make sure that the shadow build compiles correctly it is important that:

- The original Qt source package is untouched (configure has never been run in the source tree directory).
- The shadow build directory is on the same level as the Qt source package.

  If the Qt package is in `C:\Qt\4.4.1` the shadow build directory could be `C:\Qt\shadowbuild`. A shadow build from a directory like `C:\shadowbuild` will not compile.

- Add the `\bin` directory of the shadow build directory to the `PATH` environment variable.

So lets assume you have installed Qt in `C:\Qt\4.4.1` and you want to create a shadow build in `C:\Qt\mobile5-release-shared`:

- First add `C:\Qt\mobile5-release-shared\bin` to the `PATH` variable.

           set PATH=C:\Qt\mobile5-release-shared\bin;%PATH%

- Make sure the enviroment variables for your compiler are set.

  Visual Studio includes vcvars32.bat for that purpose - or simply use the "Visual Studio Command Prompt" from the Start menu.

- Now navigate to your shadow build directory and run configure:

           cd c:\Qt\mobile5-release-shared
           C:\Qt\4.4.1\configure.exe -platform win32-msvc2005 -xplatform wincewm50pocket-msvc2005 -release

- Now, to build Qt you first have to update your `PATH, INCLUDE` and `LIB` paths to point to your target platforms. For a default installation of the Windows Mobile 5.0 Pocket PC SDK this is done by:

               set INCLUDE=C:\Program Files\Microsoft Visual Studio 8\VC\ce\include;C:\Program Files\Windows CE Tools\wce500\Windows Mobile 5.0 Pocket PC SDK\Include\Armv4i
               set LIB=C:\Program Files\Microsoft Visual Studio 8\VC\ce\lib\armv4i;C:\Program Files\Windows CE Tools\wce500\Windows Mobile 5.0 Pocket PC SDK\Lib\ARMV4I
               set PATH=C:\Program Files\Microsoft Visual Studio 8\VC\ce\bin\x86_arm;%PATH%

  We have provided a convenience script for this called `setcepaths`. Simply type:

               setcepaths wincewm50pocket-msvc2005

- Then to build the shadow build type:

           nmake

- That's all. Now you created a shadow build of Qt in `C:\Qt\mobile5-release-shared`.