[英]How to link with Benchmark in OCaml
我创建了一个简单的文件
Benchmark.ml:
open Benchmark ;;
print_string "It works!"; print_newline() ;;
然后我尝试使用我的Makefile的以下内容来构建它
# 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
但是我得到了错误:
Unbound module Benchmark
我该怎么解决? 我尝试使用INCDIRS
或PACKS
但无济于事。
PACKS是正确的解决方案。
只是不要命名您的文件benchmark.ml
,如果您打算使用另一个模块,该模块已经称为Benchmark
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.