开发者

OCaml makefile dependency problem

开发者 https://www.devze.com 2023-01-28 18:47 出处:网络
I am using OCaml Makefile for a project I am working on and I have the folowing modules DynamicTree.ml

I am using OCaml Makefile for a project I am working on and I have the folowing modules

DynamicTree.ml

Huffman_Dynamic.ml which uses DynamicTree

Huffman_Static.ml

main.ml which uses both Huffman_Static and Huffman_Dynamic.

This is my make file :

# 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

When I try to make the project, I get an Unbound value DynamicTree.create_anchor_leaf that results from ocamlopt -c -dtypes huffman_dynamic.ml generated by Makefile.

The Ocaml Makefile wepage states that it generates automatically dependencies, am I missing something here?

Thank you.


Is the capitalization of your name correct ? In your post you use both DynamicTree.ml and dynamictree.ml.

Are you sure the issue comes from the Makefile ? Is there really a create_anchor_leaf function exported by DynamicTree.ml ? No .mli hiding it ?

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号