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.
Sources of PROJ.4
cvs -d :pserver:firstname.lastname@example.org:/cvs/maptools/cvsroot login Password: cvs -d :pserver:email@example.com:/cvs/maptools/cvsroot co proj
Sources of WCELIBCEX
svn co https://wcelibcex.svn.sourceforge.net/svnroot/wcelibcex/trunk wcelibcex
Compiler - Microsoft Visual C++ 2005 (equal to or higher than the Standard Edition)
…and Grandmother’s Recipe
I assume the following directories structure is used:
Open one of available solutions - projce_lib (static library) or projce_dll - located under following location:
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.
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
Set wcelibcex_lib as a dependency of projce_dll: Project > Project Dependencies and select projce_dll Depends on: wcelibcex_lib.
Grab some beer(s) from the fridge :-)
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.