首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >#OCaml ocamldoc生成错误

#OCaml ocamldoc生成错误
EN

Stack Overflow用户
提问于 2018-01-16 23:55:33
回答 1查看 50关注 0票数 1

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

但是我有这个错误:

代码语言:javascript
复制
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
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2018-01-17 00:00:05

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

为了使其正常工作,您需要首先编译项目,然后将ocamldoc指向.cmi所在的_build/compiler文件夹

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

代码语言:javascript
复制
ocamldoc -html -I _build/compiler compiler/*.ml -d doc/

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

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/48285189

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档