GNU Libtool

Fastbit (WAH)的代码可在链接中下载

安装以及运行命令如下:

解压命令:
$ tar -zxvf fastbit-ibis1.3.8.tar.gz
 
安装命令:
$ cd fastbit-ibis1.3.8
$ ./configure
$ make
 
由于安装时Makefile使用了GNU Libtool创建库,生成Libtool的库文件libfastbit.la,这个文件在./src下。
假设当前测试文件名为test.cpp,它在fastbit-ibis1.3.8下,编译运行test.cpp文件时,运行命令:
$ libtool --mode=compile g++ -c test.cpp
$ libtool --mode=link g++ -o test test.lo src/libfastbit.la
$ ./test
 
为了方便,我们可以通过写bash脚本方便我们编译和运行。
脚本cmd.sh如下:
libtool --mode=compile g++ -c test.cpp
libtool --mode=link g++ -o test test.lo src/libfastbit.la
./test
rm test
rm test.lo
 
 
运行脚本:
$ sh cmd.sh

  

 

posted @ 2014-12-16 17:47  yejinru  阅读(327)  评论(0编辑  收藏  举报