[Haskell-beginners] Installing regex-pcre (revisited)

Stephen Tetley stephen.tetley at gmail.com
Sun Dec 11 13:11:51 CET 2011


On 11 December 2011 08:41, Asokan Pichai <pasokan at talentsprint.com> wrote:

> The OP's question is for a Unix-like environment on Windows; which
> is Cygwin.

Indeed (and also MSYS), but the OP wants especially to work with PCRE
and the Haskell bindings to it are unlikely to work directly with
Cygwin, but they should with MinGW / MSYS.

>
>>
>> The reason for this is basically that everyone else does. Linking
>> static libraries is a bit different internally to Cygwin and it does
>> not seem to "just work" whereas it usually does on MinGW provided you
>> have the C library already working.
>
> I do not understand this part.

Yes - it wasn't at all clear.

FFI bindings (in Haskell) link to C static libraries - *.a files on
Cygwin or MSYS (plus headers are needed during compilation).

There are differences between Cygwin and MSYS *.a files, I know little
about what the differences are but I know that the consequence is
linking to Cygwin libs doesn't work seemlessly with GHC[*]. Maybe it
wouldn't be much work to get GHC working with Cygwin libs but no-one
appears to have done it and documented their success, hence "everyone"
uses MSYS where things are already working.

[*] GHC actually ships with build tools from MinGW / MSYS, but once
you start working with FFI bindings you really want a proper
installation of MSYS.



More information about the Beginners mailing list