用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。于是编译成功,问题解决!

相关文章:

  • 2022-01-04
  • 2022-02-24
  • 2022-12-23
  • 2021-05-14
  • 2021-05-16
  • 2021-10-27
  • 2021-09-21
猜你喜欢
  • 2022-12-23
  • 2021-11-01
  • 2022-12-23
  • 2021-06-04
  • 2022-12-23
  • 2022-12-23
  • 2022-01-25
相关资源
相似解决方案