2010-12-01 65 views
3

我使用OCaml的Makefile中的一个项目我的工作和我有如下因素模块OCaml的makefile依存问题

DynamicTree.ml

Huffman_Dynamic.ml它采用DynamicTree

Huffman_Static.ml

main.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 

当我尝试做这个项目,我得到一个Unbound value DynamicTree.create_anchor_leaf从通过生成的makefile ocamlopt -c -dtypes huffman_dynamic.ml结果。

Ocaml Makefile wepage states that it generates自动依赖项,我在这里丢失了什么吗?

谢谢。

+0

你可以发布一个日志,说明在make clean之后运行`make`会发生什么吗?这可以提供一些见解。 – 2010-12-01 02:20:25

回答

8

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

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

+0

谢谢,那是导致问题的T的大写字母 – 0xFF 2010-12-01 14:08:04