haskell - ghc compile error but runghc works -
update solved
i updated haskell platform 2011.2.0.1 , ghc 7.0.3 , works!!
i have following haskell file named "webscrap2.hs". can execute "runghc webscrap2.hs" , works fine. when compile file error.
webscrap2.hs
import text.html.tagsoup import network.curl (curlgetstring, urlstring) main :: io () main = html <- openurl "https://github.com/languages/haskell/created" let links = linkify html print links openurl :: urlstring -> io string openurl target = fmap snd $ curlgetstring target [] linkify :: string -> [string] linkify l = [x | tagopen "a" atts <- parsetags l, (_,x) <- atts]
ghc --version
the glorious glasgow haskell compilation system, version 6.12.3
ghc -o webscrap2 webscrap2.hs
webscrap2.o: in function `r17i_info': (.text+0x1fe): undefined reference `tagsoupzm0zi12_textzihtmlzitagsoupziparser_parsetags_closure' webscrap2.o: in function `r17i_info': (.text+0x204): undefined reference `tagsoupzm0zi12_textzistringlike_zdfstringlikezmzn_closure' webscrap2.o: in function `s1eb_info': (.text+0x6fc): undefined reference `curlzm1zi3zi7_networkzicurl_curlgetstring_closure' webscrap2.o: in function `s1ed_info': (.text+0x927): undefined reference `__stginit_curlzm1zi3zi7_networkzicurl_' webscrap2.o: in function `s1ed_info': (.text+0x933): undefined reference `__stginit_tagsoupzm0zi12_textzihtmlzitagsoup_' webscrap2.o: in function `r17i_srt': (.data+0x90): undefined reference `tagsoupzm0zi12_textzihtmlzitagsoupziparser_parsetags_closure' webscrap2.o: in function `r17i_srt': (.data+0x98): undefined reference `tagsoupzm0zi12_textzistringlike_zdfstringlikezmzn_closure' webscrap2.o: in function `s1ed_srt': (.data+0xf8): undefined reference `curlzm1zi3zi7_networkzicurl_curlgetstring_closure' collect2: ld returned 1 exit status
any pointers problem might be?
you might want try updating ghc , packages using, see if helps.
Comments
Post a Comment