我正在使用OCaml Makefile进行我正在进行的项目,我有以下模块
DynamicTree.ml
Huffman_Dynamic.ml 哪个使用 DynamicTree
Huffman_Static.ml
main.ml它使用Huffman_Static和Huffman_Dynamic.
这是我的make文件:
# put here the names of your source files (in the right order)
SOURCES = huffman_static.ml dynamictree.ml huffman_dynamic.ml main.ml
# the name of the resulting executable
RESULT = huffman
# generate type information (.annot files)
ANNOTATE = yes
# make target (see manual) : byte-code, debug-code, native-code
all: native-code
include OCamlMakefile
Run Code Online (Sandbox Code Playgroud)
当我尝试创建项目时,我得到了Makefile生成的Unbound value DynamicTree.create_anchor_leaf结果ocamlopt -c -dtypes huffman_dynamic.ml.
Ocaml Makefile wepage 声明它会自动生成依赖项,我在这里遗漏了什么吗?
谢谢.
你的名字大写是否正确?在你的帖子中你使用DynamicTree.ml和dynamictree.ml.
你确定问题来自Makefile吗?真的有一个create_anchor_leaf函数导出了DynamicTree.ml吗?没.mli隐藏吗?