创建.cma文件OCaml

时间:2014-02-12 21:49:19

标签: build ocaml ocamlbuild

我是OCaml的新手,我正在尝试使用其HANSEI库。为此,我需要包含几个.ml和.mli文件,如前面提到的here以及caml-shift.tar.gz here

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文件。请帮我解决一下这个。如果我的理解错误,请告诉我。谢谢!

2 个答案:

答案 0 :(得分:0)

在使用它之前,您需要首先构建delimcc库..

答案 1 :(得分:0)

使用opam package installer

opam search delimcc
Available packages for system:
delimcc  --  Oleg's delimited continuations library for byte-code and native OCaml