wxWidgets 在 Linux 下开发环境配置
2016-08-30 22:27
323 查看
本文基于 CodeBlocks (16.0.1) 和 wxWidgets (3.0.2) 搭建 Linux 下 GUI 开发环境。
1. 安装 CodeBlocks
Ubuntu 默认的源当前 CodeBlocks 版本为 13.x,为安装最新稳定版,如下步骤,
$ sudo add-apt-repository ppa:damien-moore/codeblocks-stable
$ sudo apt-get update
$ sudo apt-get codeblocks
2. 下载 wxWidgets Linux 源码包 wxWidgets-3.0.2.tar.bz2
- 解压到任意目录,比如 ~/wxWidgets-3.0.2 (安装完成后此包可以删除)
- Linux 的安装说明在 ~/wxWidgets-3.0.2/docs/gtk/install.txt
- $ ./configure --with-gtk --disable-shared --enable-unicode # 编译成 SHARED=0, UNICODE=1, MONOLITHIC=0 (默认)
输出信息如下,
==================================================================
Configured wxWidgets 3.0.2 for `x86_64-unknown-linux-gnu'
Which GUI toolkit should wxWidgets use? GTK+ 2 with support for GTK+ printing libnotify
Should wxWidgets be compiled into single library? no
Should wxWidgets be linked as a shared library? no
Should wxWidgets support Unicode? yes (using wchar_t)
What level of wxWidgets compatibility should be enabled?
wxWidgets 2.6 no
wxWidgets 2.8 yes
Which libraries should wxWidgets use?
STL no
jpeg sys
png sys
regex builtin
tiff sys
zlib sys
expat sys
libmspack no
sdl no
==================================================================
- $ make
- $ sudo make install
- $ sudo ldconfig
- $ wx-config --version (应该输出 3.0.2,表示安装成功)
3. 项目编译
- 基于 CodeBlocks: 同 Windows 环境。
- 基于命令行的编译 (注意 wx 相关信息如何添加,例如): $ g++ main.cpp simple.cpp `wx-config --cxxflags --libs` -o simple
完。
1. 安装 CodeBlocks
Ubuntu 默认的源当前 CodeBlocks 版本为 13.x,为安装最新稳定版,如下步骤,
$ sudo add-apt-repository ppa:damien-moore/codeblocks-stable
$ sudo apt-get update
$ sudo apt-get codeblocks
2. 下载 wxWidgets Linux 源码包 wxWidgets-3.0.2.tar.bz2
- 解压到任意目录,比如 ~/wxWidgets-3.0.2 (安装完成后此包可以删除)
- Linux 的安装说明在 ~/wxWidgets-3.0.2/docs/gtk/install.txt
- $ ./configure --with-gtk --disable-shared --enable-unicode # 编译成 SHARED=0, UNICODE=1, MONOLITHIC=0 (默认)
输出信息如下,
==================================================================
Configured wxWidgets 3.0.2 for `x86_64-unknown-linux-gnu'
Which GUI toolkit should wxWidgets use? GTK+ 2 with support for GTK+ printing libnotify
Should wxWidgets be compiled into single library? no
Should wxWidgets be linked as a shared library? no
Should wxWidgets support Unicode? yes (using wchar_t)
What level of wxWidgets compatibility should be enabled?
wxWidgets 2.6 no
wxWidgets 2.8 yes
Which libraries should wxWidgets use?
STL no
jpeg sys
png sys
regex builtin
tiff sys
zlib sys
expat sys
libmspack no
sdl no
==================================================================
- $ make
- $ sudo make install
- $ sudo ldconfig
- $ wx-config --version (应该输出 3.0.2,表示安装成功)
3. 项目编译
- 基于 CodeBlocks: 同 Windows 环境。
- 基于命令行的编译 (注意 wx 相关信息如何添加,例如): $ g++ main.cpp simple.cpp `wx-config --cxxflags --libs` -o simple
完。
相关文章推荐
- 在Linux下配置Java开发环境
- 在Linux下配置Java开发环境
- Fedora 7(Linux)下 Apache+PHP+MySQL+Subversion 开发测试环境配置过程
- linux系统下配置jsp开发环境
- Linux下jsp开发环境,apache,tomcat服务器配置过程
- 在LINUX下配置JAVA开发环境
- 在LINUX下配置JAVA开发环境【转自http://chenzhe.blogchina.com】
- Linux下jsp开发环境,apache,tomcat服务器配置过程
- 如何在Linux下配置Java开发环境详述
- 在LINUX下配置JAVA开发环境
- 教您如何在Linux下配置Java开发环境详述
- 在LINUX下配置JAVA开发环境
- LINUX下配置JAVA开发环境
- Linux下QT平台Mysql数据库开发环境配置
- 在LINUX下配置JAVA开发环境
- Linux下配置Java开发环境(JDK配置)详述
- 在LINUX下配置JAVA开发环境
- Linux下如何配置OpenGL开发环境
- 在LINUX下配置JAVA开发环境
- linux下J2EE开发环境详细配置