Place the header file in the same directory as your .c
file and use -I.
when compiling
gcc -I. main.c -o myprog
You shouldn't place your header files in /usr/include
that is meant for the system headers.
Note: you don't actually need the -I.
because the current directory is searched by default, nevertheless, it doesn't hurt to add it.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…