|
From: Paul M. <gu...@mo...> - 2001-07-05 20:48:23
|
I'm trying to run the Mingw gcc compiler from within Cygwin. My reason is=
to
use Cygwin/bash to run configure, but to build the packages using Mingw, =
so
that they have no Cygwin dependency at runtime - yes, I know about
-mno-cygwin, and that is an option, I guess, but I'd prefer to use the =
Mingw
compiler if possible - not least as it builds executables which use =
MSVCRT
rather than CRTDLL.
However, if I add my Mingw binaries directory to the front of PATH, via
export PATH=3D/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)
=3D=3D=3D> Shouldn't this say "Using specs from <somewhere>" ?
$ gcc -v -o x.exe x.c
Using builtin specs.
gcc version 2.95.3-4 (mingw special)
cpp0 -lang-c -v -iprefix ../lib/gcc-lib/mingw32/2.95.3-4/ -D__GNUC__=3D2=
-D__GNUC
=3D=3D=3D> This is where cpp0 is run without a path...
=3D=3D=3D> The same command, run from CMD.EXE (with the same environment)
C:\Cygwin\home\Administrator>gcc -v -o x.exe x.c
Reading specs from
c:/applications/mingw/bin/../lib/gcc-lib/mingw32/2.95.3-4/specs
gcc version 2.95.3-4 (mingw special)
c:/applications/mingw/bin/../lib/gcc-lib/mingw32/2.95.3-4/cpp0.exe =
-lang-c -v
-iprefix c:\applications\mingw\bin/../lib/gcc-lib/mingw32/2.95.3-4/ =
-D__GNUC__=3D2
=3D=3D=3D> "Reading specs from ..." and a full path for cpp0.
Does anybody have a clue what might be wrong here? This is a clean =
install of
Cygwin, downloaded today, with no changes to the setup. The Mingw =
download is
the recent 1.0 release, unpacked in C:\Applications\Mingw, with no tweaks=
or
changes.
Obviously, this is going to be something in my setup, as others don't =
appear to
be having this problem. But what?
Thanks in advance for any help.
Paul.
|