Imagine you have two something.h in two different directories. You cannot write to those directories and do not have root access.
You have code that does :
#include <something.h>
How do you specify use the something.h in a specific directory and ignore the other ?
try using:#include "../directory/something.h"
Note that GCC looks for headers using the Search Path.
You can also ask GCC to look for header files in specified directories. Use -iquote dir
, to add the directory dir
to the head of the list of directories to be searched for header files.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With