i am trying to compile a ocaml program (part of it shown below)
open Ocamlbuild_plugin
open Command
(** helper functions )
( splitting strings using a delimeter character *)
let rec strsplit sep str accu len =
try let idx = String.rindex_from str (len - 1) sep in
strsplit sep str ((String.sub str (idx + 1) (len - 1 - idx)) :: accu) idx
with Not_found -> (String.sub str 0 len) :: accu
let strsplit sep str = strsplit sep str [] (String.length str)
(** initializing variables from the environment *)
let host = Ocamlbuild_pack.Ocamlbuild_Myocamlbuild_config.system
the last line is causing unbound module error. What can i do? thanks
update 1:
The code is from a github project https://github.com/ykazakov/cb-reasoner
And i am following an instruction there to use "make" to compile the program .. this make file looks like this
BUILDDIR ?= _build
OCAMLBUILD ?= ocamlbuild
OCAMLBUILD := $(OCAMLBUILD) -build-dir $(BUILDDIR)
.PHONY: main clean clib
main:
$(OCAMLBUILD) main/cb.native
all:
$(OCAMLBUILD) main/cb.native jni cwrap/libcb.a
cwrap:
$(OCAMLBUILD) cwrap/libcb.a
jni:
$(OCAMLBUILD) jni
clean:
$(OCAMLBUILD) -clean;\
rm -f cb.native