编译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

转载于:https://www.cnblogs.com/davytitan/p/5580368.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值