inux下wxWidgets(wxWindows)的安装

先去http://www.wxwidgets.org/downloads/上下载最新版本的wxWidgets,下载ALL,那里面包含所有的.
参考资料:
	http://www.codeproject.com/useritems/Linux.asp
	http://www.codeproject.com/library/wxwidgets.asp
1 tar xvf wxWidgets-2.8.8.tar.bz2
2 cd ./wxWidgets-2.8.4
3 ./configure --with-gtk -disable-shared
4 make
5 su <type root password>
6 make install
7 ldconfig
安装完了以后可以测试一下

# wx-config --version

2.8.4

如果需要卸载wiWidgets,
  >cd wxGTK-2.6.3
  >su <type root password>
  >make uninstall
  >ldconfig
  注意:如果gcc版本在3.3以下(gcc -v查看),需要下载并安装wxWidgets-2.6.3-Patch-2.tar.gz,否则make通不过;或者升级gcc
  (2)检查安装是否成功:
  > wx-config --cxx
  正常情况下输出g++,否则,follow me,
  > cd /usr/local/bin
  > ls wx-config (看看是否存在)
  如果存在,请将/usr/local/bin加入用户PATH变量中
  如果不存在,follow me,
  > ln -s /usr/local/lib/wx/config/gtk2-ansi-release-2.6 wx-config

最后,在编译的时候,可能会出现以下情况,如

g++  hworld.cpp 'wx-config --libs --cxxflags' -o hworld
g++: wx-config --libs --cxxflags : No such file or directory

这时,你可以试试这样,

g++  hworld.cpp $(wx-config --libs --cxxflags) -o hworld

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值