Compiling regex-posix on Windows
fox at ucw.cz
Fri Mar 26 08:21:49 EDT 2010
disregard my previous post.
I just imported the module.
But I get a different error:
Prelude> import Text.Regex.Posix
Prelude Text.Regex.Posix> "bar" =~ "(foo|bar)" ::Bool
Loading package array-0.3.0.0 ... linking ... done.
Loading package syb-0.1.0.2 ... linking ... done.
Loading package base-22.214.171.124 ... linking ... done.
Loading package bytestring-0.9.1.5 ... linking ... done.
Loading package containers-0.3.0.0 ... linking ... done.
Loading package mtl-126.96.36.199 ... linking ... done.
Loading package regex-base-0.93.1 ... linking ... done.
Loading package regex-posix-0.94.1 ... <interactive>: regex: The specified module could not be found.
can't load .so/.DLL for: regex (addDLL: could not load DLL)
Sorry for confusion,
> I had a similar problem, ghc 6.12.1, windows 32bit, posix-regex-0.94.1
> from hackage. I used libregex.a (and corresponding dll) from Mingw.
> My problem was that I could not link an application which imported
> I was able to solve it by modifying a line
> in package.conf.d/regex-posix-0.94.1blahblah to
> ld-options: -lregex
> (do not forget to ghc-pkg recache after that :)
> When I tried importing Text.Regex.Posix in ghci now, it works.
> I know adding a line to file in package.conf.d id not The Right Way, it
> can be probably fixed in the .cabal file, but I just wanted a quick fix.
> Does it work for you?
> > Hi all,
> > The only problem stalling the release of the Windows installer for the
> > new Haskell Platform is the bug in regex-posix. It compiles fine
> > (using the libregex.a library from MinGW), but
> > fails at runtime with the following error:
> > Prelude> import Text.Regex.Posix
> > Prelude Text.Regex.Posix> "bar" =~ "(foo|bar)" ::Bool
> > Loading package array-0.3.0.0 ... linking ... done.
> > Loading package bytestring-0.9.1.5 ... linking ... done.
> > Loading package containers-0.3.0.0 ... linking ... done.
> > Loading package mtl-188.8.131.52 ... linking ... done.
> > Loading package regex-base-0.93.1 ... linking ... done.
> > Loading package regex-posix-0.94.1 ... linking ... <interactive>: E:\Program Fil
> > es (x86)\Haskell\regex-posix-0.94.1\ghc-6.12.1\HSregex-posix-0.94.1.o: unknown s
> > ymbol `_regerror'
> > : unable to load package `regex-posix-0.94.1'
> > Prelude Text.Regex.Posix>
> > Unfortunately, Chris, the maintainer, doesn't have access to a Windows
> > machine with GHC currently, and therefore can't help me.
> > I'd appreciate any pointers on how to fix this.
> > --
> > () ascii ribbon campaign - against html e-mail
> > /\ www.asciiribbon.org - against proprietary attachments
> > _______________________________________________
> > Libraries mailing list
> > Libraries at haskell.org
> > http://www.haskell.org/mailman/listinfo/libraries
> Libraries mailing list
> Libraries at haskell.org
More information about the Libraries