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

Aaron Denney wnoise at ofb.net
Mon Feb 4 03:43:11 EST 2008

On 2008-02-03, Bulat Ziganshin <bulat.ziganshin at gmail.com> wrote:
> 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
>> compiler.
>> So I think we should file a feature request about building C sources
>> using gcc/ms-c directly rather than going via ghc as that would give us
>> the flexibility to use alternative C compilers.
> sorry, i think it's not whole story. gcc and msvc are probably
> incompatible in the meaning that you can't link together code
> produced by two compilers. exactly dll should be generated which allow
> to avoids this incompatibility

Well, the whole purpose of the ABI is to allow linking code together
from different compilers.  This doesn't mean there won't be any problems,
but I'd expect the ones that crop up won't *strictly* be because of
the compilers being different, but because of the C libraries being
different.  DLL vs object files shouldn't change things all that much.

Aaron Denney

More information about the Haskell-Cafe mailing list