【问题标题】:#OCaml ocamldoc generation error#OCaml ocamldoc 生成错误
【发布时间】:2018-01-17 00:13:33
【问题描述】:

您好,我正在尝试使用 ocamldoc 生成 ocaml 文档。我正在尝试以下命令:ocamldoc -html alpha.mli -d doc/

但我有这个错误:

File "compiler/alpha.ml", line 16, characters 12-23:
Error: Unbound module Id
File "compiler/argHandler.ml", line 3, characters 17-27:
Error: Unbound module Parser
File "compiler/ARMGeneration.ml", line 7, characters 38-41:
Warning 10: this expression should have type unit.
File "compiler/ARMGeneration.ml", line 8, characters 47-59:
Warning 10: this expression should have type unit.
File "compiler/ARMGeneration.ml", line 11, characters 10-33:
Error: Unbound module Exception
File "compiler/ASMLGeneration.ml", line 7, characters 44-60:
Error: Unbound module Syntax
File "compiler/id.ml", line 44, characters 38-61:
Error: Unbound module Exception
File "compiler/knorm.ml", line 11, characters 4-14:
Error: Unbound module Syntax
File "compiler/letfold.ml", line 4, characters 4-15:
Error: Unbound module Syntax
File "compiler/main.ml", line 15, characters 4-24:
Error: Unbound module ArgHandler
File "compiler/regAllocation.ml", line 202, characters 18-29:
Error: Unbound module Id
File "compiler/SyntaxArm.ml", line 8, characters 12-16:
Error: Unbound module Id
File "compiler/syntax.ml", line 20, characters 12-16:
Error: Unbound module Id
11 error(s) encountered

【问题讨论】:

    标签: compilation ocaml ocamldoc


    【解决方案1】:

    ocamldoc找不到构建生成的.cmi时会出现这个错误。

    为了让它工作,你需要先编译你的项目,然后将ocamldoc指向_build/compiler.cmi所在的文件夹

    对您来说有效的命令可能如下所示:

    ocamldoc -html -I _build/compiler compiler/*.ml -d doc/
    

    -I 选项表示您将指定.cmi 所在的文件夹。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-12-26
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-05-19
      相关资源
      最近更新 更多