1
我嘗試在我的一個文件中打開Yojson.Basic.Util
,並且一直收到錯誤信息nbound module
。我已經嘗試了幾種不同的事情,似乎無法找出什麼是錯的未綁定的模塊Yojson.Basic.Util
我有這個在我的.ocamlinit
:
#require "yojson";;
#require "ANSITerminal";;
,這在我的makefile
:
test:
ocamlbuild -pkg yojson, oUnit test.byte && ./test.byte
play:
ocamlbuild -pkgs oUnit,yojson,str,ANSITerminal main.byte && ./main.byte
check:
bash checkenv.sh
clean:
ocamlbuild -clean
打字make
產生此錯誤:
ocamlbuild -pkg yojson, oUnit test.byte && ./test.byte
ocamlfind: Package `yojson,' not found
Cannot run Ocamlfind.
make: *** [test] Error 2
Chan詹姆士的makefile
到:
test:
ocamlbuild -use-ocamlfind -pkg yojson, oUnit test.byte && ./test.byte
play:
ocamlbuild -pkgs oUnit,yojson,str,ANSITerminal main.byte && ./main.byte
check:
bash checkenv.sh
clean:
ocamlbuild -clean
我輸入make
,這讓我這個錯誤:
ocamlbuild -use-ocamlfind -pkg yojson, oUnit test.byte && ./test.byte
Solver failed:
Ocamlbuild knows of no rules that apply to a target named oUnit. This can happen if you ask Ocamlbuild to build a target with the wrong extension (e.g. .opt instead of .native) or if the source files live in directories that have not been specified as include directories.
Compilation unsuccessful after building 0 targets (0 cached) in 00:00:00.
make: *** [test] Error 6