这里安装的CUnit版本是CUnit-2.1-3,下载地址:
http://sourceforge.net/projects/cunit/files/?source=navbar
下载解压后,根据里面的readme和百度搜索别人的安装说明,并没有很顺利的安装成功,总是少了些步骤,最后总结如下:
进入CUnit-2.1-3目录,执行以下命令:
autoscan
mv configure.in configure.ac
aclocal
autoheader
automake
当执行到automake的时候,会提示出错:
error:required file ‘./compile’ not found
error :required file ‘./install-sh’ not found
error :required file ‘./missing’ not found
error :required file ‘./depcomp’ not found
根据出错的提示,执行:
automake –add-missing
又提示出错了:
error :required file ‘./ltmain.sh’ not found
继续百度搜索,解决方法如下:
libtoolize –automake –copy –debug –force
最后执行:
automake
autoconf
./configure
make
make install
安装成功后,就可以使用CUnit创建你的单元测试了。
参考资料:
CUnit在Linux下安装配置:http://www.linuxdiyf.com/linux/18418.html