* /usr/include path issue
@ 2011-05-19 6:54 Gabor Alsecz
2011-05-19 10:20 ` Csaba Raduly
2011-05-19 12:45 ` Nellis, Kenneth
0 siblings, 2 replies; 5+ messages in thread
From: Gabor Alsecz @ 2011-05-19 6:54 UTC (permalink / raw)
To: cygwin
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
So how can i add the fine include directory path to the compiler or
cygwin bash to find the .h includes?
Same issue (include .h file(s) not found) when i try to
compile/configure Kannel under cygwin
Regards,
Gabor
--
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: /usr/include path issue
2011-05-19 6:54 /usr/include path issue Gabor Alsecz
@ 2011-05-19 10:20 ` Csaba Raduly
2011-05-19 10:34 ` Gábor Alsecz
2011-05-19 12:45 ` Nellis, Kenneth
1 sibling, 1 reply; 5+ messages in thread
From: Csaba Raduly @ 2011-05-19 10:20 UTC (permalink / raw)
To: cygwin
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: /usr/include path issue
2011-05-19 10:20 ` Csaba Raduly
@ 2011-05-19 10:34 ` Gábor Alsecz
2011-05-19 16:32 ` Christopher Faylor
0 siblings, 1 reply; 5+ messages in thread
From: Gábor Alsecz @ 2011-05-19 10:34 UTC (permalink / raw)
To: Csaba Raduly, cygwin
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: /usr/include path issue
2011-05-19 6:54 /usr/include path issue Gabor Alsecz
2011-05-19 10:20 ` Csaba Raduly
@ 2011-05-19 12:45 ` Nellis, Kenneth
1 sibling, 0 replies; 5+ messages in thread
From: Nellis, Kenneth @ 2011-05-19 12:45 UTC (permalink / raw)
To: cygwin
> From: Gabor Alsecz
> <snip/>
> 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
>
> So how can i add the fine include directory path to the compiler or
> cygwin bash to find the .h includes?
>
> Same issue (include .h file(s) not found) when i try to
> compile/configure Kannel under cygwin
>
> Regards,
> Gabor
I get a different error from yours when gcc can't find an include
file, so I'm wondering if it's not a /usr/include path issue, but
something else?
$ gcc --version
gcc (GCC) 4.3.4 20090804 (release) 1
Copyright (C) 2008 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$ gcc x.c
x.c:1:17: error: xyz.h: No such file or directory
$
--Ken Nellis
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: /usr/include path issue
2011-05-19 10:34 ` Gábor Alsecz
@ 2011-05-19 16:32 ` Christopher Faylor
0 siblings, 0 replies; 5+ messages in thread
From: Christopher Faylor @ 2011-05-19 16:32 UTC (permalink / raw)
To: cygwin
On Thu, May 19, 2011 at 12:33:31PM +0200, G?bor Alsecz wrote:
>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
Sounds like you aren't using the Cygwin version of gcc:
http://cygwin.com/problems.html
--
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
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-05-19 16:32 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-19 6:54 /usr/include path issue Gabor Alsecz
2011-05-19 10:20 ` Csaba Raduly
2011-05-19 10:34 ` Gábor Alsecz
2011-05-19 16:32 ` Christopher Faylor
2011-05-19 12:45 ` Nellis, Kenneth
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).