zoukankan      html  css  js  c++  java
  • 编译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

  • 相关阅读:
    HDU 1198
    HDU 1863
    HDU 1879
    HDU 1233
    HDU 1232
    HDU 1829
    HDU 2473
    hdu 1829 A Bug's Life
    hdu 3038 How Many Answers Are Wrong
    hdu 1198 Farm Irrigation
  • 原文地址:https://www.cnblogs.com/davytitan/p/5580368.html
Copyright © 2011-2022 走看看