首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何与OCaml中的基准链接

如何与OCaml中的基准链接
EN

Stack Overflow用户
提问于 2015-11-09 18:24:28
回答 1查看 39关注 0票数 0

我创建了一个简单的文件

benchmark.ml:

代码语言:javascript
复制
open Benchmark ;;

print_string "It works!"; print_newline() ;;

然后,我尝试用Makefile的以下内容构建它

代码语言:javascript
复制
# put here the names of your source files (in the right order)
SOURCES = benchmark.ml

# the name of the resulting executable
RESULT  = benchmark

# generate type information (.annot files)
ANNOTATE = yes

# make target (see manual) : byte-code, debug-code, native-code, ...
all: debug-code

include OCamlMakefile

但我知道错误是:

代码语言:javascript
复制
Unbound module Benchmark

我该怎么做才能修好它?我试过使用INCDIRSPACKS,但没有结果。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2015-11-09 18:38:13

包是正确的解决方案。

只是不要命名您的文件benchmark.ml,如果您打算使用另一个模块,即已经被称为Benchmark

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/33615672

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档