Linux Deepin 12.06上编译wxWidgets 2.9.5

最近把wxWidgets在Win7和Linux上都试过了一遍,发现CodeBlock真的是个好东西,配合上wxWidgets这个跨平台的UI框架真的是无敌了,前面讲了Win7用VC和MingW编译wxWidgets-2.9.5,现在讲讲怎么编译在Deepin 12.06(等效Ubuntu 12.04)上编译。

相关阅读:

Ubuntu下为OpenCV配置wxWidgets/OpenGL以及三者混合编程

Ubuntu下Code::Blocks + wxWidgets 2.9.3开发环境搭建

1. 下载wxWidgets-2.9.5源码

这个没什么好说的,自己去官网下载适合Linux下的源码并解压。

2. 运行configure

Linux上编译和Win下不一样,主要是利用configure这个自动编译系统,应该说比用Win下的配置选项多了不是一点点,通过configure --help > help.txt,我将configure的配置选项打印出来,大家看看就知道怎么选择了。

Configure Help

`configure' configures wxWidgets 2.9.5 to adapt to many kinds of systems.

Usage: ./configure [OPTION]... [VAR=VALUE]...

To assign environment variables (e.g., CC, CFLAGS...), specify them as
VAR=VALUE.  See below for descriptions of some of the useful variables.

Defaults for the options are specified in brackets.

Configuration:
  -h, --help              display this help and exit
      --help=short        display options specific to this package
      --help=recursive    display the short help of all the included packages
  -V, --version          display version information and exit
  -q, --quiet, --silent  do not print `checking ...' messages
      --cache-file=FILE  cache test results in FILE [disabled]
  -C, --config-cache      alias for `--cache-file=config.cache'
  -n, --no-create        do not create output files
      --srcdir=DIR        find the sources in DIR [configure dir or `..']

Installation directories:
  --prefix=PREFIX        install architecture-independent files in PREFIX
                          [/usr/local]
  --exec-prefix=EPREFIX  install architecture-dependent files in EPREFIX
                          [PREFIX]

By default, `make install' will install all the files in
`/usr/local/bin', `/usr/local/lib' etc.  You can specify
an installation prefix other than `/usr/local' using `--prefix',
for instance `--prefix=$HOME'.

For better control, use the options below.

Fine tuning of the installation directories:
  --bindir=DIR            user executables [EPREFIX/bin]
  --sbindir=DIR          system admin executables [EPREFIX/sbin]
  --libexecdir=DIR        program executables [EPREFIX/libexec]
  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
  --localstatedir=DIR    modifiable single-machine data [PREFIX/var]
  --libdir=DIR            object code libraries [EPREFIX/lib]
  --includedir=DIR        C header files [PREFIX/include]
  --oldincludedir=DIR    C header files for non-gcc [/usr/include]
  --datarootdir=DIR      read-only arch.-independent data root [PREFIX/share]
  --datadir=DIR          read-only architecture-independent data [DATAROOTDIR]
  --infodir=DIR          info documentation [DATAROOTDIR/info]
  --localedir=DIR        locale-dependent data [DATAROOTDIR/locale]
  --mandir=DIR            man documentation [DATAROOTDIR/man]
  --docdir=DIR            documentation root [DATAROOTDIR/doc/wxwidgets]
  --htmldir=DIR          html documentation [DOCDIR]
  --dvidir=DIR            dvi documentation [DOCDIR]
  --pdfdir=DIR            pdf documentation [DOCDIR]
  --psdir=DIR            ps documentation [DOCDIR]

X features:
  --x-includes=DIR    X include files are in DIR
  --x-libraries=DIR  X library files are in DIR

System types:
  --build=BUILD    configure for building on BUILD [guessed]
  --host=HOST      cross-compile to build programs to run on HOST [BUILD]

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:http://www.heiqu.com/6c7f103c2695cb2e3294a34804727620.html