我有一个名为 Facebook.ml 的文件,它使用 Netclient 库中的 Https_client 模块。我已将该文件编译为 Facebook.cmo,并且可以在顶层和我编译的其他代码中使用所有函数而不会出现任何问题。
但是,ocsigenserver 无法在 Netclient 库中找到 Https_client 模块,当我测试我的 ocsigen 构建时,make test.byte
我收到了错误
ocsigenserver -c local/etc/UC/UC-test.conf
ocsigenserver: main: Fatal - While loading /home/.../Facebook.cmo: error while linking /home/.../Facebook.cmo.
ocsigenserver: main: Reference to undefined global `Https_client'
make: *** [test.byte] Error 52
我在 .conf.in 文件中添加了以下行:
<library module="/home/.../Facebook.cmo" />
我正在编译 Facebook.ml
ocamlfind ocamlc -thread -package core,equeue-ssl,netclient,lwt -linkpkg Facebook.ml
我做错了什么?
按照 Drup 的建议,我将 Makefile.options 文件更新为
PROJECT_NAME := UC
# Source files for the server
SERVER_FILES := UC.ml Facebook.cmo
# Source files for the client
CLIENT_FILES := $(wildcard *.eliomi *.eliom)
# OCamlfind packages for the server
SERVER_PACKAGES := home/alpha/.opam/4.01.0/lib/netclient/netclient.cma
# OCamlfind packages for the client
CLIENT_PACKAGES :=
收到错误:
Fatal error: exception Fl_package_base.No_such_package("home/alpha/.opam/4.01.0/lib/netclient/netclient.cma", "")
make: *** [_server/Facebook.cmo] Error 2
但我知道该文件确实存在于指定的文件路径中。我需要在其他任何地方添加路径吗?