Reputation: 6140
I have so many includes like this in my application
#include "../../libs/helper.hpp"
I am glad to remove there ../../libs/
from every include. Is there any way to fix this problem so I can call the library this way?
#include "helper.hpp"
one possible way is to use -I
switch in make file. But the problem is that then I should use angular brackets <
and >
for calling libraries. It is undesirable since I prefer to distinguish between my local libraries and the installed libraries. So I am looking for a way to call it with "
around the name of the libraries.
Is there any way?
Upvotes: 1
Views: 500
Reputation: 16043
-iquotedir
Add the directory dir to the head of the list of directories to be searched for header files only for the case of#include "file"
; they are not searched for#include <file>
, otherwise just like-I
.
https://gcc.gnu.org/onlinedocs/gcc-5.3.0/gcc/Directory-Options.html#Directory-Options
Upvotes: 1