-
Notifications
You must be signed in to change notification settings - Fork 14
Open
Description
OCaml allows to interface libraries written in C, for example. Therefore, C stubs must be added to use the C library. My question is, how can I produce a *.jar from OCaml source that has a reference to C stubs?
Consider the following library ocaml-minisat. This library is a binding to the Minisat-C-1.14.1 solver. The signature of the ocaml-minisat dependency is as follows:
module Raw : sig
external create : unit -> t = "caml_minisat_new"
external delete : t -> unit = "caml_minisat_delete"
(* code omitted *)
end
The C stubs are located in the same directory with the filename libminisat_stubs.c.
Running ocamljava -c Minisat.mli works fine (the interface). After calling ocamljava -c Minisat.ml the following error is produced:
File "Minisat.ml", line 1:
Error: Primitive 'caml_minisat_new' cannot be found
Is there any way to tell ocamljava where the defined C stubs of the library are located?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels