我正在为正在进行的项目使用OCaml Makefile,并且具有以下模块
DynamicTree.ml
使用Huffman_Dynamic.mlDynamicTreeHuffman_Static.mlmain.ml同时使用Huffman_StaticHuffman_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

当我尝试制作项目时,我得到了由Makefile生成的Unbound value DynamicTree.create_anchor_leaf生成的ocamlopt -c -dtypes huffman_dynamic.ml

Ocaml Makefile网页states that it generates自动依赖,我在这里缺少什么吗?

谢谢。

最佳答案

您的名字大写正确吗?在您的帖子中,您同时使用DynamicTree.mldynamictree.ml

您确定问题来自Makefile吗? create_anchor_leaf是否真的导出了DynamicTree.ml函数?没有.mli隐藏吗?

07-28 01:40
查看更多