开发者

Undefined symbol caml_call_gc after ocamlmklib?

I'm trying to build a library for installation, but I am not sure what this error means:

$ ocamlmklib -custom -linkall 开发者_如何学运维 ociml.ml -o ociml
$ ocaml
        Objective Caml version 3.12.0

# #load "ociml.cma";;
Cannot load required shared library dllociml.
Reason: ./dllociml.so: ./dllociml.so: undefined symbol: caml_call_gc.

I guess I must just be missing some options on the command line? Thanks!


ocamlmklib without C objects will not generate dll*.so at all, and with -custom it will not generate any *.so either. So your example is not full/self-containing and so it is hard to guess what is wrong. Look at the existing bindings for examples.


A relatively random suggestion here as I can't reproduce locally, but have you tried -lcamlrun? It is supposed to link the OCaml runtime (-lasmrun for native code).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜