Mateusz Loskot :: hacking on, working out, living up

How to build PROJ.4 for Windows CE

31 Aug 2007 | mloskot

Recently, I’ve been asked for some help in building PROJ.4 library for Windows CE systems, like Windows Mobile 5.0 for Pocket PC. So, I decided to write down all steps required to get this task done with success.

Ingredients

…and Grandmother’s Recipe

I assume the following directories structure is used: C:\dev C:\dev\proj C:\dev\wcelibcex

  1. Open one of available solutions - projce_lib (static library) or projce_dll - located under following location: C:\dev\proj\wince\msvc80

  2. Add project of WCELIBCE library to the loaded solution:

    • Go to the Solution Explorer

    • Select File > Add > Existing Project…

    • Navigate to C:\dev\wcelibcex\msvc80 and select wcelibcex_lib.vcproj file. OK.

  3. Set WCELIBCEX_PATH macro in the Property Sheet of PROJ.4 project (projce_common.vcproj):

    • Go to the Property Manager (in the View menu)

    • Double-click on projce_common leaf in the tree (it doesn’t matter if you expand Debug or Release node)

    • Go to Common Properties > User Macros

    • Double-click on WCELIBCEX_DIR macro and set proper location: C:\dev\wcelibcex\src.

    • Apply and OK

  4. Set wcelibcex_lib as a dependency of projce_dll: Project > Project Dependencies and select projce_dll Depends on: wcelibcex_lib.

  5. Grab some beer(s) from the fridge :-)

  6. Run Build > Build Solution (F7)

For example, if you’re building PROJ.4 as DLL for Windows Mobile 5.0 for Pocket PC, and you select debug configuration, you will find PROJ.4 binaries - proj.dll and proj_i.lib in following location:

C:\dev\proj\wince\msvc80\projce_dll\Windows Mobile 5.0 Pocket PC SDK (ARMV4I)\Debug

I hope someone will find this guide helpful. If there is anything unclear, put your questions as a comment below

BTW, there is README file in proj/wince/msvc80 including helpful information about how to build and use PROJ.4 under Windows CE platforms.

Fork me on GitHub