c - How to specify default include directory in GCC -


i new in gcc , wondering how tell compiler several include directories need specified default searching .h files. read -i dir key accomplish doing makefiles encounter problems. example:

include_dir = c:/users/rmrd001/documents/make/gcc/first/mydir/ flags = -i "$(include_dir)"  func2.o: func2.c func2.h     gcc $(flags) -c func2.c 

and got error:

make:*** no rule make target 'func2.c', needed 'func2.o'. stop.

the include_dir not working directory. working_directory/my_dir. please help.

-i used finding include files, not finding main file. have pass explicit path main file.


Comments