gcc main.c -o main -I include
I am creating a small c application with following directory structure:
app=>
- =>src (a directory, with all source files)
- =>include (a directory, with all header files)
- =>common (a directory, with all common files)
- =>main.c
Now I am trying to run main.c which contains #include directive to include header files from include directory and function calls to .c files in both common and src directories. I am using -I option but it is useful only for one directory path indication. How does the compiler will look in all src, common and include directories to resolve the calls. Kindly suggest me a command or make file to provide path of multiple directories while compiling with gcc.
common/
? – Beta