Issue
I have included the header file in each source file,but it fails to find them when I usemake
command. These header files included are simple and located in the same project directory.
In file included from tests/list_tests.c:1:
tests/minunit.h:6:10: fatal error: dbg.h: No such file or directory
6 | #include "dbg.h"
| ^~~~~~~
compilation terminated.
Below are all the project files: code in github
I have tried to add-I *PATH*
to gcc but it fails to find files either. And I add PATH to .bashrc then usemake
,it also can't find files.
Solution
You use -Isrc
, but the file dbg.h
is in the directory src/lcthdw
. Change the directory for the -I
flag (or add another -I
flag with the src/lcthdw
directory).
Answered By - 9769953 Answer Checked By - Clifford M. (WPSolving Volunteer)