|
From: <dan...@ya...> - 2001-07-05 22:26:54
|
--- Paul Moore <gu...@mo...> wrote: > > However, if I add my Mingw binaries directory to the front of PATH, > via > export PATH=/cygdrive/c/Applications/Mingw/bin:$PATH > and try to compile a trivial program, I get an error > > $ gcc -o x.exe x.c > gcc.exe: installation problem, cannot exec `cpp0': No such file or > directory > > When I execute this command line from a CMD.EXE prompt, it works > fine. > > Obviously, I'm doing something wrong, but what? I installed cygwin > from > setup and took all the defaults. > > I asked on the cygwin list, and got some useful pointers. Running > "gcc -v -o > x.exe x.c" shows that cpp0 is being run *without* a path, and as it > isn't on > $PATH it doesn't get run. > > Some extracts from gcc -v output: > > $ gcc -v > Using builtin specs. > gcc version 2.95.3-4 (mingw special) > > ===> Shouldn't this say "Using specs from <somewhere>" ? > Yes it should. The problem is in mingw gcc's (the gcc-2.95.3-20010608 vesrion that in in mingw-1.0). It was built to use '/' as the primary directory separator. This works fine on NT and W2K, using cmd shell, but not on W9x *or* when running gcc from tcsh, zsh, or as in your case bash. To fix your problem (I hope), download the gcc-2.95.3-20010613-W95patch from SF and overwrite the gcc,c++, g++ ,f77 and cpp drivers in your <mingw-root>/bin directory. These updated binaries drivers were built with a default dir separator of '\\'. They work okay for me with Cygwin's bash and with Amol's ports of zsh and tcsh (as well as with the native cmd or command shell). Danny _____________________________________________________________________________ http://messenger.yahoo.com.au - Yahoo! Messenger - Voice chat, mail alerts, stock quotes and favourite news and lots more! |