How to include custom .h files in / usr / include

I have some custom .h files placed in / usr / include, but in a directory (/ usr / include / itsmag1c), and I'm trying to include them in my C file. I assume that since I use

#include "filename.h";

for files in the same directory, and I would use angle brackets to include a file such as math.h or stdio.h. Am I right in assuming that I will use angle brackets to include my own header files? If so, my program will not compile, I get an error that the incoming files could not be found. Can someone tell me how I will include these files, or would it be better if they were in the same directory as my program?

+3
source share
2

:

  • #include <itsmagic1c/filename.h>

  • #include <filename.h>, , -I.

Boost .. 1. ( , Boost, , Linux ).

2. , , Makefiles ..

+4

. "". gcc,

  -Irelativedir 

  -I/usr/local/yourpath.
+2

All Articles