views:

327

answers:

2

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

+2  A: 

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.

Vinko Vrsalovic
+2  A: 

Includes don't use the same path that is used for finding executables. Check the documentation on your compiler for where it searches for includes.

Darron