Proper way to include C code from directories other than the current directory
问题 I have two directories, sorting and searching (children of the same directory), that have .c source files and .h header files: mbp:c $ ls sorting array_tools.c bubble_sort.c insertion_sort.c main selection_sort.c array_tools.h bubble_sort.h insertion_sort.h main.c selection_sort.h mbp:c $ ls searching array_tools.c array_tools.h binary_search.c binary_search.h linear_search.c linear_search.h main main.c Within searching , I am building an executable that needs to use insertion_sort function,