2008年9月11日 星期四

Windows CE - 編譯AP時的錯誤:Error spawning 'cmd.exe'

當你用VS2005編譯為WM6的AP時出現以下錯誤時:

error PRJ0003:Error spawning 'cmd.exe'

可以用以下方法解決:

Tools→Options→Projects and Solutions→VC++ Directories
Platform:選擇你編譯出來的AP執行的環境,ex:"Windows Mobile 5.0 Pocket PC"
Show directories for:選擇"Executable files"
增加"C:\Windows\System32"

大功告成。

Ps.其實就是環境變數沒有設定好,VS2005找不到cmd.exe這個物件的位置。