Reputation: 29
I really don't like when I have to navigate backwards in my includes. I'd mutch more prefere if there would be a way to avoid that. Look at this folder for example:
Is there any way to tell the compiler (gcc) to start looking for includes from RootFolder, so I can say #include "Logic/Entitiy/Player.h"
in my MainView.h/c or anywhere else, so I can avoid that unappealing backwards navigations.
Upvotes: 0
Views: 110
Reputation: 456
include your RootFolder to compile stage like -I "RootFolder"
then you can use #include "Logic/Entitiy/Player.h"
just what you want.
Upvotes: 1
Reputation: 16454
You can pass include directories to your compiler. The configuration depends on the compiler. For gcc you set an include directory with -I
. https://gcc.gnu.org/onlinedocs/cpp/Search-Path.html
Upvotes: 5