Re: GNU compiler question
Sources can be in different folders. It normally makes sense to have all new files belonging to a project in one branch so that you can work with relative paths. For headers of basic libraries you were using absolute paths (normally) or use the include environment variable.
The compiler gets the information where to search for header files by the -I option, e. g.
gcc -I ./include <more options>
You can add the "-I folder" pair multiple times.
Re: GNU compiler question
Thank you. :) I'm happy I can achieve the folder organization I want.
Re: GNU compiler question
You can also specify the path in the include
Code:
#include "../headers/myheader.h"
A lot of libraries work that way.