srdja / Collections-C

A library of generic data structures for the C language.
http://srdja.github.io/Collections-C
GNU Lesser General Public License v3.0
2.8k stars 328 forks source link

when make occurs error #169

Closed wcz233 closed 7 months ago

wcz233 commented 1 year ago

Collections-C/test/list_test.c:895:5: error: implicit declaration of function ‘CHECK_EQUAL_C_BOOL’; did you mean ‘CHECK_EQUAL_C_REAL’? [-Werror=implicit-function-declaration] 895 | CHECK_EQUAL_C_BOOL(true, *res); | ^~~~~~ | CHECK_EQUAL_C_REAL cc1: all warnings being treated as errors make[2]: [test/CMakeFiles/list_test.dir/build.make:63: test/CMakeFiles/list_test.dir/list_test.c.o] Error 1 make[1]: [CMakeFiles/Makefile2:275: test/CMakeFiles/list_test.dir/all] Error 2 make: *** [Makefile:141: all] Error 2

below is my shell command:

git clone https://github.com/srdja/Collections-C.git
cd Collections-C
mkdir build
cd build
cmake ..
make

Then I changed "Collections-C/test/list_test.c:895" "CHECK_EQUAL_C_BOOL(true, res);" to "if(res);" :

cd Collections-C
sed -i "895s/CHECK_EQUAL_C_BOOL(true, \*res);/if(*res);/g" test/list_test.c
cd build
make

Test passed.

srdja commented 7 months ago

Fixed.