编译C语言单元测试框架CUnit库的方法

引用: http://blog.csdn.net/yygydjkthh/article/details/46357421

个人备忘使用

/*********************************************************************

 * Author  : Samson

 * Date    : 06/04/2015

 * Test platform:

 *              gcc (Ubuntu 4.8.2-19ubuntu1) 4.8.2

 *              GNU bash, 4.3.11(1)-release (x86_64-pc-linux-gnu)

 * *******************************************************************/

下载 CUnit-2.1-3.tar.bz2:

http://sourceforge.net/projects/cunit/

解压:

tar jxvf CUnit-2.1-3.tar.bz2

cd  CUnit-2.1-3

因为是使用GNU automake

aclocal

autoheader 
autoconf 
automake

automake --add-missing

再次执行automake:

automake

configure.in:161: required file `./ltmain.sh' not found

以上的报错使用以下命令进行配置:

libtoolize --automake --copy --debug --force

查看是否生成了configure,执行:

./configure

查看是否生成了Makefile,若已有执行:

make

安装编译出的库:

sudo make install 

查看是否已经安装成功:

ls /usr/local/lib/libcunit.so

然后在此基础上,稍微修正了一下

aclocal

171 autoheader

172 autoconf

173 automake

174 automake --add-missing

175 automake

176 libtoolize --automake --copy --debug --force

177 ls

178 ./configure

179 make[有错]

180 automake --add-missing

181 ./configure

182 make

183 sudo make install

184 ls /usr/local/lib/libcunit.so

 

 

REF:

http://cunit.sourceforge.net/

http://blog.csdn.net/yygydjkthh/article/details/43197031

posted @ 2016-06-13 13:41  姜大伟  阅读(623)  评论(0编辑  收藏  举报