This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: Problem w/ gcc: sensitive to path it was invoked on...
- From: Linda Walsh <cygwin at tlinx dot org>
- To: cygwin at cygwin dot com
- Date: Wed, 15 Jan 2014 13:28:15 -0800
- Subject: Re: Problem w/ gcc: sensitive to path it was invoked on...
- Authentication-results: sourceware.org; auth=none
- References: <52D639E5 dot 9070304 at tlinx dot org> <loom dot 20140115T093618-321 at post dot gmane dot org>
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