[Haskell-cafe] can GHC build an executable from a C source file?

Anton Tayanovskyy anton.tayanovskyy at gmail.com
Tue Mar 17 12:48:04 EDT 2009


Works for me without the --make, as `ghc foo.c`

--A

On Tue, Mar 17, 2009 at 6:32 PM, Manlio Perillo
<manlio_perillo at libero.it> wrote:
> Hi.
>
> I'm checking if it possible to build an executable from C source files only.
>
> As an example:
>
> #include <stdio.h>
>
> int main () {
>    printf("hello world\n");
>    return 0;
> }
>
>
> $ghc --make foo.c
>
>
> However this only produces the object file, foo.o; it does not build the
> executable file.
>
>
> What is the reason for this behaviour?
> I have tested with GHC 6.8.2.
>
>
>
> Thanks  Manlio
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>


More information about the Haskell-Cafe mailing list