Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/unix/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ocaml 使用sexplib的编译错误_Ocaml_Ocamlfind - Fatal编程技术网

Ocaml 使用sexplib的编译错误

Ocaml 使用sexplib的编译错误,ocaml,ocamlfind,Ocaml,Ocamlfind,我需要在我的程序中使用Sexplib。我试过了 ocamlc sexplib.cma prog.ml Error: Unbound module Sexplib 我发现了错误。但如果我先加载ppx_sexp_conv包,我可以在顶层使用Sexplib: #require "ppx_sexp_conv";; open Sexplib;; 所以我也试过这个: ocamlfind ocamlc -package ppx_sexp_conv sexplib.cma prog.ml Error: Er

我需要在我的程序中使用Sexplib。我试过了

ocamlc sexplib.cma prog.ml
Error: Unbound module Sexplib
我发现了错误。但如果我先加载ppx_sexp_conv包,我可以在顶层使用Sexplib:

#require "ppx_sexp_conv";;
open Sexplib;;
所以我也试过这个:

ocamlfind ocamlc -package ppx_sexp_conv sexplib.cma prog.ml
Error: Error while linking /Users/neko/.opam/system/lib/sexplib/sexplib.cma(Sexplib):
The external function `caml_ba_get_1' is not available

我不知道这意味着什么,我现在需要做什么。。。有人能帮忙吗?

caml\u ba\u get\u 1
是Bigarray模块的一个功能。您可以尝试在bigarray包中进行链接(或
bigarray.cma
)。在我的系统上,函数是在
libbigarray中定义的。a

链接器缺少程序包使用的C外部。您应该能够通过将
-linkpkg
传递到
ocamlfind
来修复此问题,以便它将相关参数传递给链接器:

ocamlc -package ppx_sexp_conv -linkpkg prog.ml