No such file or directory but the directory is in the path

file-not-foundpath

Hello I am compiling a program with make but I get the error of No such file or directory but the file is in a directory of the path.

I have this #include "genetic.h", that file is in a directory called /home/myuser/toolbox/lib/genalg and in the PATH I have …:/home/myuser/toolbox/lib/genalg, so I do not why make cannot find the library. Any ideas?. Thanks

Best Solution

Your shell path has nothing to do with how compiling works, the related paths are the library path (-L option on gcc) which is where the compiler looks for libraries and the include path (-I option on gcc) which is where the compiler looks for header files. Check this link out if you are using gcc.