ChiefChippy2
ChiefChippy2

Reputation: 23

Where can I find and download netdb.h?

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

Answers (1)

user4104817
user4104817

Reputation:

Do locate netdb.h under to find out (the file ).

Under it is in located at /usr/include/netdb.h (installed with the compXX file set, and not being packaged as glibc)

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

Related Questions