Reputation: 23
I tried to compile a .c
file but it returns the error:
yay.c:6:19: fatal error: netdb.h: No such file or directory
#include <netdb.h>
^
compilation terminated.
I did some research and apparently .h
is a header file for C...
I am new to C so I don't know what to do.
Upvotes: 0
Views: 6889
Reputation:
Do locate netdb.h
under unix to find out (the file path).
Under openbsd it is in located at /usr/include/netdb.h
(installed with the compXX
file set, and not being packaged as glibc
)
c headers are usually placed in /usr/include
and /usr/local/include
directories depending on if they are system or local (third-party, custom), respectively.
Upvotes: 2