GCC in the Windows distribution of GHC

Babo Attila attila.babo at glenisys.hu
Wed Dec 7 16:41:22 EST 2005


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



More information about the Glasgow-haskell-users mailing list