我创建了一个简单的文件
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,但没有结果。
发布于 2015-11-09 18:38:13
包是正确的解决方案。
只是不要命名您的文件benchmark.ml,如果您打算使用另一个模块,即已经被称为Benchmark。
https://stackoverflow.com/questions/33615672
复制相似问题