2011-05-14 33 views
1

我試圖建立安裝庫,但我不知道這是什麼錯誤意味着:ocamlmklib之後的未定義符號caml_call_gc?

$ 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. 

我想我必須只是缺少在命令行上的一些選項?謝謝!

回答

0

沒有C對象的ocamlmklib將根本不會生成dll*.so,並且使用-custom也不會生成任何*.so。所以你的例子不是完整的/自我包含的,所以很難猜出什麼是錯的。查看現有的綁定示例。

0

一個相對隨機的建議,因爲我不能在本地複製,但你有沒有試過-lcamlrun?它應該鏈接OCaml運行時(本地代碼爲-lasmrun)。

+0

嗯,這似乎不是它。不管怎麼說,還是要謝謝你 :-) – Gaius 2011-05-14 11:09:17