Problem w/ gcc: sensitive to path it was invoked on...

Linda Walsh cygwin@tlinx.org
Wed Jan 15 21:28:00 GMT 2014


Mark Geisert wrote:
> Linda Walsh writes:
> > Can't believe doesn't work for anyone.
> >
> > For me, I've tried multiple c progs (simple ones),
>
> You don't supply any example that shows your attempt and the resulting error
> message(s).  So maybe it (whatever *it* is) is working for everybody else?
----

Um...*simple*...like:
law.Bliss> uname -a
CYGWIN_NT-6.1 Athenae 1.7.27(0.271/5/3) 2013-12-09 11:54 x86_64 Cygwin
law.Bliss> cd bin
law.Bliss/bin> cat hello.c
main() {
printf("Hello World\n");
}
law.Bliss/bin> gcc -o hello hello.c
gcc: error: spawn: No such file or directory
====
> 1> Path:    C:\Users\law.Bliss\bin\lib
> 2>     C:\usr\sbin
> 3>     C:\bin
> 4>     C:\sbin
> 5>     .
> 6>     C:\prog64\vim\gvim.exe
> 7>     C:\bin
> 8>     C:\sbin
> -----
>
> There was some discussion recently, last month I think, about the relative
> position of /bin and /usr/bin in PATH mattering in a way it didn't use to.
> I can't find the discussion or I'd link to it.  But in any case you might
> try substituting /usr/bin for /bin in your PATH setup.
----

...hmmm...this is ugly...
law.Bliss/bin> PATH=/usr/bin:$PATH
law.Bliss/bin> gcc -o hello hello.c
hello.c: In function 'main':
hello.c:2:1: warning: incompatible implicit declaration of built-in function 
'printf' [enabled by default]
 printf("Hello World\n");
 ^
law.Bliss/bin> hello
Hello World


gcc is sensitive to the path it was invoked on?... gcc bug?




--
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



More information about the Cygwin mailing list