首页 > 学院 > 开发设计 > 正文

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

2019-11-17 03:26:02
字体:
来源:转载
供稿:网友

用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 --usercabal buildcabal install --force-reinstalls

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

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


发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表