Re[2]: [Haskell-cafe] Cabal, GHC, FFI and Visual Studio on Windows

2008-02-03 Thread Bulat Ziganshin
Hello Duncan, Sunday, February 3, 2008, 5:24:22 AM, you wrote: > Ok, so you could create a separate component to produce the .dll / .a > from the C code but you'd prefer the convenience of being able to just: > c-sources: blah.c > and have them included in the project, but built using the MS C >

Re: [Haskell-cafe] Cabal, GHC, FFI and Visual Studio on Windows

2008-02-03 Thread Magnus Therning
Duncan Coutts wrote: > On Sat, 2008-02-02 at 22:33 +, Magnus Therning wrote: >> Duncan Coutts wrote: >> [..] >>> Just so I'm sure I understand... >> Sure thing. >> >>> Or are you just trying to link some C code statically into a haskell >>> program, but it just so happens that this C code relie

Re: [Haskell-cafe] Cabal, GHC, FFI and Visual Studio on Windows

2008-02-02 Thread Duncan Coutts
On Sat, 2008-02-02 at 22:33 +, Magnus Therning wrote: > Duncan Coutts wrote: > [..] > > Just so I'm sure I understand... > > Sure thing. > > > Or are you just trying to link some C code statically into a haskell > > program, but it just so happens that this C code relies on being built > > w

Re: [Haskell-cafe] Cabal, GHC, FFI and Visual Studio on Windows

2008-02-02 Thread Magnus Therning
Duncan Coutts wrote: [..] > Just so I'm sure I understand... Sure thing. > Or are you just trying to link some C code statically into a haskell > program, but it just so happens that this C code relies on being built > with MS's C compiler rather than gcc. Yes, this is exactly it. I mean, I cou

Re: [Haskell-cafe] Cabal, GHC, FFI and Visual Studio on Windows

2008-02-02 Thread Duncan Coutts
On Sat, 2008-02-02 at 18:50 +, Magnus Therning wrote: > Duncan Coutts wrote: > [..] > > It would be reasonable to use the system C compiler rather than ghc, > > however we will have to do more work to find what extra include dirs get > > used and have Cabal pass those. > > > > Currently we pa

Re: [Haskell-cafe] Cabal, GHC, FFI and Visual Studio on Windows

2008-02-02 Thread Magnus Therning
Duncan Coutts wrote: [..] > It would be reasonable to use the system C compiler rather than ghc, > however we will have to do more work to find what extra include dirs get > used and have Cabal pass those. > > Currently we pass the -package flags to ghc which ghc uses to look up > what include dir

Re: [Haskell-cafe] Cabal, GHC, FFI and Visual Studio on Windows

2008-02-02 Thread Duncan Coutts
On Sat, 2008-02-02 at 18:15 +0100, Felix Martini wrote: > Magnus Therning wrote: > > Is it possible to get Cabal to use 'cl' (Microsoft's C/C++ compiler > > shipped with Visual Studio Express)? > > Duncan Coutts wrote: > > The problem is to get GHC to use 'cl'. That's a longer term project that >

Re: [Haskell-cafe] Cabal, GHC, FFI and Visual Studio on Windows

2008-02-02 Thread Felix Martini
Magnus Therning wrote: > Is it possible to get Cabal to use 'cl' (Microsoft's C/C++ compiler > shipped with Visual Studio Express)? Duncan Coutts wrote: > The problem is to get GHC to use 'cl'. That's a longer term project that > GHC HQ are interested in. There's something about it on the GHC dev

Re: [Haskell-cafe] Cabal, GHC, FFI and Visual Studio on Windows

2008-02-02 Thread Duncan Coutts
On Fri, 2008-02-01 at 11:42 +, Magnus Therning wrote: > Is it possible to get Cabal to use 'cl' (Microsoft's C/C++ compiler > shipped with Visual Studio Express)? The problem is to get GHC to use 'cl'. That's a longer term project that GHC HQ are interested in. There's something about it on t

[Haskell-cafe] Cabal, GHC, FFI and Visual Studio on Windows

2008-02-01 Thread Magnus Therning
Is it possible to get Cabal to use 'cl' (Microsoft's C/C++ compiler shipped with Visual Studio Express)? I've found the Wiki page on using Visual Studio to create a DLL, then convert it to a .a file so that GHC can consume it. I'd rather skip using Visual Studio to build things and just ship a Ca