在Ubuntu 9.04上编译安装FLTK 1.1.9笔记

请注意,本文写于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
   
至此,编译安装结束,很顺利。

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值