2

我是 OCaml 的新手,我正在尝试使用它的HANSEI库。为此,我需要包含这里提到的少量 .ml 和 .mli 文件以及这里提到caml -shift.tar.gz 。

我的 MakeFile 中的第一行内容如下:

# HANSEI: OCaml library for direct probabilitic programming
#
# The library requires the caml-shift library, delimcc.cma and the 
# correspondent .mli files. See caml-shift.tar.gz.
# Please adjust DELIMCC= below to point to the library.
#
# The typical command to use the OCaml top-level:
# $ ocaml -I ../../Continuations/caml-shift/ \
#       ../../Continuations/caml-shift/delimcc.cma
# and then do #load "prob.cma";;

# $Id$

DELIMCC=/root/.opam/4.00.1/lib/caml-shift
OCAMLC=ocamlc
OCAMLOPT=ocamlopt

DELIMCCRUN=-I $(DELIMCC) -dllpath $(DELIMCC) $(DELIMCC)/delimcc.cma
DELIMCCINT=$(DELIMCC)/delimcc.cmi
DELIMCCOPT=-I $(DELIMCC)  $(DELIMCC)/delimcc.cmxa

LIB=prob.cma
LIBOPT=prob.cmxa
.
.
.

MakeFile 的评论部分建议我将 delimcc.cma 文件与其他 .ml 和 .mli 文件一起使用,但我不确定如何创建 .cma 文件。我找不到已经创建的 delimcc.cma 文件。请帮我解决一下这个。如果我的理解有误,请告诉我。谢谢!

4

2 回答 2

0

使用opam 包安装程序

opam search delimcc
Available packages for system:
delimcc  --  Oleg's delimited continuations library for byte-code and native OCaml
于 2014-02-13T12:21:44.117 回答
0

看起来你需要先构建 delimcc 库,然后再使用它。

于 2014-02-13T05:20:56.253 回答