OCaml makefile dependency problem

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

DynamicTree.ml

Huffman_Dynamic.mlwhich uses DynamicTree

Huffman_Static.ml

main.mlwhich 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 create a project, I get Unbound value DynamicTree.create_anchor_leafwhich is obtained from the ocamlopt -c -dtypes huffman_dynamic.mlgenerated Makefile.

Ocaml Makefile wepage states that it automatically generates dependencies, I don’t see something here?

Thank.

+3
source share
1 answer

Is capitalization of your name used correctly? In your message you use both DynamicTree.ml, and DynamicTree.ml.

, Makefile? create_anchor_leaf, DynamicTree.ml? .mli ?

+8

Source: https://habr.com/ru/post/1777820/


All Articles