wxWidgets在wince上的编译方法

最近准备折腾折腾wxWidgets,顺便在wince上也跑一下看看效果。google中发现很多网友都在问如何能够在wince下编译(新下载的2.8.7版本里的wince工程无法使用),后来仔细看了一下wxwidgets的官方wiki,其实里面早有说明,参考http://wiki.wxwidgets.org/Developers_Notebook-WxWinCECompiling里面最后一部分。这里简单整理一下:

1、下载bakefile,wxwidgets使用bakefile创建wince的工程。可以去http://bakefile.sourceforge.net/download.php,这里给出bakefile-0.2.3-setup.exe链接(以后可能会失效)。

2、把bakefile安装目录添加到path环境变量(bakefile-0.2.3-setup.exe安装时可以自动设置),或者以后使用绝对路径。

3、编辑build/bakefiles/Bakefiles.bkgen 文件,找到disable-formats里的msevc4prj,删掉msevc4prj

4、创建wince工程文件

  • md %WXWIN%/build/wince
  • cd %WXWIN%/build/bakefiles
  • C:/Programmi/Bakefile/src/bakefile_gen -f msevc4prj

%WXWIN%是wxwidgets的根目录,如E:/wxMSW-2.8.7。

这样就创建了evc4可以使用的vcw及vcp文件了。

5. Build using eVC++4 (偷懒不翻译了^_^)

  • open workspace %WXWIN%/build/wince/wx.vcw (Marco and Julian tried with eVC4, ABX tried with eVC3)
  • (VC8 works but the project import doesn't preserve output libary names or paths so you'll have to massage sample project files a bit)
  • select type of build (debug/unicode)
  • select target
  • In sequence build
    • wxzlib
    • wxjpeg
    • wxexpat
    • gl
    • mono
  • open workspace in one of samples folder
  • select the same settings for type of build and target
  • build (and run if targeted to emulator)

(转自:http://blog.csdn.net/Delores/archive/2008/04/13/2288484.aspx)

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章