RE: GCC in the Windows distribution of GHC

On 07 December 2005 13:39, cschmidt@deds.nl wrote:
The Windows distribution of GHC includes GCC. Some header files (such as iostream, algorithm, and so forth), however, are missing (at least I was not able to find them).
I could, of course, download the correct version of GCC (this must be version 3.2.3 for GHC 6.4), and put the header files where GCC can find them. I only wonder if this is the right thing to do.
Were the header files omitted just to make the distribution smaller, or for some other reason?
The GCC bundled with GHC is intended mainly for compiling Haskell code via-C, and we didn't intend it to be invoked independently. Hence, it just contains the bits we need. If you want to compile C files using GHC (a reasonable thing to do), then the right thing to do is install a full GCC somewhere (eg. the mingw gcc), and tell GHC to use it, like this: $ ghc -pgmc c:/mingw/bin/gcc -c foo.c Cheers, Simon

Simon Marlow wrote:
If you want to compile C files using GHC (a reasonable thing to do), then the right thing to do is install a full GCC somewhere (eg. the mingw gcc), and tell GHC to use it, like this:
$ ghc -pgmc c:/mingw/bin/gcc -c foo.c
How this flag affects linking and the location of default libraries? This flag should be in the Windows FAQ, google suggests to use the bundled GCC for external libraries from a Darcs FAQ. Using two or more set of compilers and libraries on Windows is annoying. It's reasonable to bundle GCC, but if the user already has the full MingW and MSYS environment and using ghc(i) from this shell I prefer to use the "native" GCC instead of the bundled. Is there any global way to do this? Setting the order of directories in the PATH or a special environment variable would be nice. Cheers: Babo
participants (2)
-
Babo Attila
-
Simon Marlow