-1

I am having a problem in installing CUnit on Ubuntu.

I tried

sudo apt install libcunit1 libcunit1-doc libcunit1-dev

after the command

CUnit --version

says command not found.

I searched and was unable to find anything. Does anyone have a reliable solution? Thanks in advance!

arslan
  • 2,034
  • 7
  • 34
  • 61

2 Answers2

0

Have you tried

To use CUnit framework in your project, you must install it first

sudo apt-get install libcunit1 libcunit1-doc libcunit1-dev

Then in your test.c

#include <CUnit/CUnit.h>

And finally, you must add the flag –lcunit to the gcc command (at the end)

gcc  -o test test.c  -lcunit

From: https://mysnippets443.wordpress.com/2015/03/07/ubuntu-install-cunit/

NB: I have not tried this myself.

Nisse Engström
  • 4,738
  • 23
  • 27
  • 42
eman
  • 1
0

CUnit isn't an executable, so CUnit --version won't work. It's just a library.

You can check installation by looking at the installation location. For me it installed in /usr/lib/x86_64-linux-gnu/libcunit.* (there are a couple files)