椿の日記

たぶんプログラムの話をします

Text.Regex.Posixがリンクできない

GHCi, version 6.12.3: http://www.haskell.org/ghc/  :? for help
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
Loading package base ... linking ... done.
Loading package ffi-1.0 ... linking ... done.
Prelude> import Text.Regex.Posix
Prelude Text.Regex.Posix> "foobar" =~ "foo" :: Bool
Loading package array-0.3.0.1 ... linking ... done.
Loading package bytestring-0.9.1.7 ... linking ... done.
Loading package containers-0.3.0.0 ... linking ... done.
Loading package syb-0.1.0.2 ... linking ... done.
Loading package base-3.0.3.2 ... linking ... done.
Loading package mtl-1.1.0.2 ... linking ... done.
Loading package regex-base-0.93.2 ... linking ... done.
Loading package regex-posix-0.94.2 ... linking ... <interactive>: C:\usr\bin\HAS
KEL~1\201020~1.0\lib\extralibs\regex-posix-0.94.2\ghc-6.12.3\HSregex-posix-0.94.
2.o: unknown symbol `_regerror'
: unable to load package `regex-posix-0.94.2'

ぐぐったらチケット発見。

http://trac.haskell.org/haskell-platform/ticket/137

'cabal install regex-posix' can solve this problem, hence it's a valid workaround as you mentioned.

インストールしたら解決した。