You will need wxWidgets 2.6.3 RC2 or later to create Windows Mobile 5.0-specific applications or Pocket PC 2003 applications that will work correctly on Windows Mobile 5.0.
To build Windows Mobile 5.0-specific applications you need Visual Studio 2005, which costs money, but to build Pocket PC or Smartphone 2003 applications that will also run on Windows Mobile 5.0 devices, you only need Embedded Visual C++ 4.0, which is free. This section assumes you are using Visual Studio 2005.
Before compiling wxWidgets, install VS 2005 and download and install the required SDKs: Windows Mobile 5.0 Pocket PC and/or Windows Mobile 5.0 Smartphone. Be sure to install these BEFORE you open any wxWidgets projects.
Open build/wince/wx.vcw in VS 2005. It will prompt you to convert all project files, convert them. When the conversion finishes, VS 2005 should list 6 'Solutions' in the Solutions Explorer ( gl, mono, wxexpat, wxjpeg, wxpng, wxzlib). You will need to adjust setting in each of those projects to make it compile. To change the properties for each project in the workspace, Right-click on the project, and select "Properties". In the tree on the left side, go to "Configuration Properties | Librarian | General | Output File", and edit it so it reads (for example) ../../lib/$(PlatformName)/$(ConfigurationName)/wx_mono.lib.
Set under C/C++/Precompiled Header the value of Create/Use Precompiled Header to Not Using Procompiled Header (only under workspace gl and mono).
Then set the current configuration to the desired one (for example, Windows Mobile 5.0 Pocket PC) and compile each project. You may get some strange errors about a missing clthumb command but try again with F7 and eventually it will compile (only if you forget the precompiled header option).