Какустанвоить бибилотеку check.h для C проекта

Пытался установить через репозиторий с git. Но более менее рабочий, стандартный:

sudo apt-get install check

На ПК у меня mint, там все хорошо. На ноутбуке у меня wsl ubuntu (подсистема ubuntu в винде, почти как MinGw)

Выдает ошибки

test.c: In function ‘s21_create_matrix_1’:
test.c:13:12: error: invalid storage class for function ‘s21_create_matrix_2’
  13 | START_TEST(s21_create_matrix_2) {
     |            ^~~~~~~~~~~~~~~~~~~
test.c: In function ‘s21_create_matrix_2’:
test.c:19:12: error: invalid storage class for function ‘s21_create_matrix_3’
  19 | START_TEST(s21_create_matrix_3) { ....

Второй вид ошибок

...... test.c:406:3: error: implicit declaration of function ‘ck_assert_double_eq_tol’ [- 
       Werror=implicit-function-declaration]
            406 |   ck_assert_double_eq_tol(1.0 / 11, res.matrix[0][0], 1e-7);
                |   ^~~~~~~~~~~~~~~~~~~~~~~ ........

И третий

test.c:647:1: error: expected declaration or statement at end of input
test.c: In function ‘s21_create_matrix_1’:
test.c:647:1: error: expected declaration or statement at end of input
At top level:
test.c:603:5: error: ‘main’ defined but not used [-Werror=unused-function]
   603 | int main(void) {
       |     ^~~~

Вот отрывок из теста:

#include <check.h>
#include <stdlib.h>

#include "s21_common.h"
#include "s21_matrix.h"

START_TEST(s21_create_matrix_1) {
  matrix_t t;
  int result = s21_create_matrix(-1, 2, &t);
  ck_assert_int_eq(1, result);
}

START_TEST(s21_create_matrix_2) {
  matrix_t t;
  int result = s21_create_matrix(1, -2, &t);
  ck_assert_int_eq(1, result);
}

START_TEST(s21_create_matrix_3) {
  matrix_t t;
  int result = s21_create_matrix(-1, -2, &t);
  ck_assert_int_eq(1, result);
}

Ошибка не в тесте, так как на ПК все работает.


Ответы (0 шт):