[Haskell]解决hslua unknown symbol `___s trtod'的问题

用cabal编译libpandoc时遇到这样的错误:

HShslua-0.3.12.o: unknown symbol `___s trtod'

ghc.exe: unable to load package `hslua-0.3.12' 

在这个地方困住了很长时间,后来在stackoverflow上找到了解决方法——Linking Error Using HsLua on Windows

if os(windows)
     CC-options:        "-D__NO_ISOCEXT"

解决操作步骤:

1. 从github签出hslua的源代码

git clone https://github.com/osa1/hslua.git

2. 在hslua.cabal文件中添加如下的设置:

  if os(windows)
    CC-Options:         "-D__NO_ISOCEXT"

3. 配置、编译并重新安装hslua

cabal configure --user
cabal build
cabal install --force-reinstalls

4. 配置、编译并重新安装pandoc

5. 配置、编译libpandoc。于是编译成功,问题解决!

posted @ 2014-04-30 17:27  dudu  阅读(1075)  评论(0编辑  收藏  举报