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

2009-03-17 Thread Manlio Perillo
Joe Fredette ha scritto: You know, I hear theres this brilliant program for compiling C code -- gcd? ccg? gcc, yah gcc... Anyone tried it? In all seriousness though, why do you need to compile c with ghc? I'm curious, it seems a bit pointless... It's for a possible extension I'm planning f

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

2009-03-17 Thread Neil Mitchell
Yhc used to do this (when you could still build it). Turns out that on Windows using gcc that gets installed with ghc isn't particularly fun, while ghc makes a very pleasant build experience. Something to do with directory layouts, head file searching, and what is on the %PATH% by default. Thanks

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

2009-03-17 Thread Joe Fredette
You know, I hear theres this brilliant program for compiling C code -- gcd? ccg? gcc, yah gcc... Anyone tried it? In all seriousness though, why do you need to compile c with ghc? I'm curious, it seems a bit pointless... /Joe Manlio Perillo wrote: Anton Tayanovskyy ha scritto: Works for m

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

2009-03-17 Thread Manlio Perillo
Anton Tayanovskyy ha scritto: Works for me without the --make, as `ghc foo.c` For me, too, thanks. Manlio ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

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

2009-03-17 Thread Anton Tayanovskyy
Works for me without the --make, as `ghc foo.c` --A On Tue, Mar 17, 2009 at 6:32 PM, Manlio Perillo wrote: > Hi. > > I'm checking if it possible to build an executable from C source files only. > > As an example: > > #include > > int main () { >    printf("hello world\n"); >    return 0; > } >

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

2009-03-17 Thread Manlio Perillo
Hi. I'm checking if it possible to build an executable from C source files only. As an example: #include 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 r