OCaml makefile依赖问题

发布于 2024-10-05 11:41:23 字数 1046 浏览 0 评论 0原文

我正在为我正在处理的项目使用 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

当我尝试创建项目时,我得到一个由 Makefile 生成的 ocamlopt -c -dtypes huffman_dynamic.ml 产生的 Unbound value DynamicTree.create_anchor_leaf

Ocaml Makefile 网页声明它生成< /a> 自动依赖,我在这里遗漏了什么吗?

谢谢。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

扛刀软妹 2024-10-12 11:41:31

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

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

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 ?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文