This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: /usr/include path issue


Hello Csaba,

Thanks for the reply:

do you actually have a netdb.h ? What does

$ find /usr/include/ -name netdb.h

print ?
it works fine, command print the /usr/include/netdb.h


gcc -v getip.c
print all directories included but /usr/include folder missing


Gabor





On Thu, May 19, 2011 at 8:54 AM, Gabor Alsecz wrote:
Hi All,

I am using the latest cygwin installation and I have an issue with my
/usr/include directory under cygwin bash.

my .c file snippet looks like this:

#include <netdb.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>

And when running gcc from bash with the followin command:
gcc getip.c

i receive the following error:
fatal error: netdb.h: No such file or directory

Hi Gabor,


do you actually have a netdb.h ? What does

$ find /usr/include/ -name netdb.h

print ?


You can check which directories gcc searches for include files by adding the -v switch to the gcc command line:

gcc -v getip.c

netdb.h is part of the cygwin package (according to
http://cygwin.com/cgi-bin2/package-grep.cgi?grep=netdb.h) which is
always installed; it should be in /usr/include, which is searched by
gcc by default.

Csaba
--
GCS a+ e++ d- C++ ULS$ L+$ !E- W++ P+++$ w++$ tv+ b++ DI D++ 5++
The Tao of math: The numbers you can count are not the real numbers.
Life is complex, with real and imaginary parts.
"Ok, it boots. Which means it must be bug-free and perfect. " -- Linus Torvalds
"People disagree with me. I just ignore them." -- Linus Torvalds


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple



--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]