请注意,本文写于2009年5月12日,如果您的步骤有所不同,也许是因为时间的不同。
因为开发上的需要,挑选了FLTK作为UI的库。虽然已经有FLTK 2.0了,但是官网上说,FLTK 1.1.9才是稳定版本,所以决定使用这个版本。
1. 从http://www.fltk.org/software.php?VERSION=1.1.9&FILE=fltk/1.1.9/fltk-1.1.9-source.tar.gz处选择镜像,并且下载。
2. 解压tar zxvf fltk-1.1.9-source.tar.gz
3. cd /home/goo/Software/fltk-1.1.9
4. emacs README &,这里我用emacs打开README文件,当然,可以用vi或者其他打开。主要浏览的内容如下:
You can run configure yourself to get the exact setup you
need. Type "./configure <options>". Options include:
--enable-cygwin - Enable the Cygwin libraries (WIN32)
--enable-debug - Enable debugging code & symbols
--disable-gl - Disable OpenGL support
--enable-shared - Enable generation of shared libraries
--enable-threads - Enable multithreading support
--enable-xdbe - Enable the X double-buffer extension
--enable-xft - Enable the Xft library (anti-aliased fonts)
--bindir=/path - Set the location for executables
[default = /usr/local/bin]
--libdir=/path - Set the location for libraries
[default = /usr/local/lib]
--includedir=/path - Set the location for include files.
[default = /usr/local/include]
--prefix=/dir - Set the directory prefix for files
[default = /usr/local]
5. 为了好管理,不使用默认的路径,我找了一个地方建立了文件夹fltk:
mkdir /home/goo/reference/fltk
cd /home/goo/refrence/fltk
mkdir bin
mkdir lib
mkdir include
6. 回到fltk原代吗目录
cd ../../Software/fltk-1.1.9
7. ./configure --enable-debug --disable-gl --enable-shared --enable-threads --enable-xdbe --enable-xft --bindir=/home/goo/reference/fltk/bin --libdir=/home/goo/reference/fltk/lib --includedir=/home/goo/reference/fltk/include --prefix=/home/goo/refreence/fltk
8. make
过程很顺利,除了几个重复出现的warning,没有其他问题。
9. make install
至此,编译安装结束,很顺利。
在Ubuntu 9.04上编译安装FLTK 1.1.9笔记
最新推荐文章于 2023-03-28 18:38:50 发布