Wednesday, June 11, 2008

Target Older Platform After Porting

After porting an eVC4 project into Visual Studio 8, I found that the application would run ok on a Windows Mobile 5.0 PDA, but would not run on a Pocket PC 2003 PDA.

For Windows Mobile projects in this newer development environment, there is no need to target the x86 build anymore. Use the /MACHINE:ARM option to set the target platform and the application will run in the Pocket PC Emulator.

The dumpbin.exe is a utility included in the C:\Program Files\Microsoft Visual Studio 9.0\VC\bin folder. First run vcvarsall.bat to set environment variables.

Use "dumpbin /headers Your.exe" to display the version that your executable is targeted to. The problem I encountered was that my Windows Mobile project was building a 5.01 version which will not run on the older PDA's.

Unfortunately there is no obvious way to change this version. Disable the Linker /SubSystem option and instead in Linker Command Line add the option /subsystem:windowsce,4.20. The executable is now targeting version 4.20!

No comments: