2

I'm attempting to build the xencat tool from this project. When I try to use ocamlopt to build it, I get

$ ocamlopt -o xencat xencat.ml 
File "xencat.ml", line 1, characters 5-13:
Error: Unbound module Cmdliner

Following guidance here, I verified that cmdliner was installed and that it was visible to ocamlfind, and then tried again:

Here's what ocamlfind list shows:

$ ocamlfind list
bigarray            (version: [distributed with Ocaml])
bytes               (version: [distributed with OCaml 4.02 or above])
...
cmdliner            (version: 0.9.8)
...

No luck:

$ ocamlfind ocamlopt -o xencat xencat.ml
File "xencat.ml", line 1, characters 5-13:
Error: Unbound module Cmdliner

Following this page, I tried ocamlbuild:

$ocamlbuild -use-ocamlfind xencat.byte
+ ocamlfind ocamlc -c -o xencat.cmo xencat.ml
File "xencat.ml", line 1, characters 5-13:
Error: Unbound module Cmdliner
Command exited with code 2.

Clearly I'm missing something, but being new to Ocaml, I don't know what else to try.

4

2 回答 2

2

ocamlbuild -use-ocamlfind -package cmdliner xencat.byte

?

于 2016-03-05T11:54:09.777 回答
1

要构建此项目,请在项目的根目录下使用以下命令:

./configure
make build

您将xencat.native在根文件夹中找到一个文件。

您也可以使用opam它来构建它,因为opam它将处理您的所有依赖项。只需转到项目的根目录并说:

opam pin add vchan .

并对 opam 要求做的任何事情回答“是”。

于 2016-03-04T21:47:35.003 回答