makefile - OCaml makefile依赖问题

标签 makefile ocaml

我正在将 OCaml Makefile 用于我正在进行的项目并且我有以下模块

DynamicTree.ml

Huffman_Dynamic.ml它使用 DynamicTree

Huffman_Static.ml

main.ml它同时使用 Huffman_Static Huffman_Dynamic .

这是我的制作文件:

# 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结果来自 ocamlopt -c -dtypes huffman_dynamic.ml由 Makefile 生成。

Ocaml Makefile 网页 states that it generates自动依赖,我这里有什么遗漏吗?

谢谢。

最佳答案

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

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

关于makefile - OCaml makefile依赖问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4320543/

相关文章:

c - 使用 Makefile 将目标文件存储在两个不同的目录中? [C]

functional-programming - 有人使用 SML 或 OCaml 来构建真实世界的 GUI 吗?

ocaml - ML中有评估吗?

c++ - 如何在 main() C++ 中调用构造函数?

在 PHP_NEW_EXTENSION 中有多个源文件的 phpize 的 config.m4 生成一个什么都不做的 Makefile

makefile - .deps/*.Po : No such file or directory compiler error

java - 在运行期间获取文件名的 java 程序的 Makefile

javascript - 如何使用 js_of_ocaml 添加 onclick 方法?

ocaml - 我可以将值传递给 Ocaml 中的仿函数吗?

oop - OCaml 结构类型和列表