On Sat, Sep 29, 2007 at 09:25:40PM -0400, Andrew Trusty wrote:
> Hello,
>
> I'm using GHC 6.6.1 under Windows XP and I can't get the following simple 
> program to compile.
>
> import Text.Regex
> main = putStrLn (subRegex (mkRegex "c") "abc" "a")
>
>
> It runs in GHCi just fine but GHC gives the following output when trying to 
> compile:
>
> project1.o(.text+0x169):fake: undefined reference to 
> `regexzmcompatzm0zi71_Textz
> iRegex_mkRegex_closure'
> project1.o(.text+0x1f7):fake: undefined reference to 
> `regexzmcompatzm0zi71_Textz
> iRegex_subRegex_closure'
> project1.o(.rodata+0x4):fake: undefined reference to 
> `regexzmcompatzm0zi71_Textz
> iRegex_mkRegex_closure'
> project1.o(.rodata+0x8):fake: undefined reference to 
> `regexzmcompatzm0zi71_Textz
> iRegex_subRegex_closure'
> collect2: ld returned 1 exit status

Use --make, or -package regex-compat.  Like most compilers, GHC defaults
to not linking unspecified libraries.  (I've already sugested to Ian
that this be changed for 6.10)

Stefan

Attachment: signature.asc
Description: Digital signature

_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to