gpt4 book ai didi

ocaml命令行找不到 "topfind"

转载 作者:行者123 更新时间:2023-12-01 20:19:12 27 4
gpt4 key购买 nike

我安装了顶级,并设置了 $OCAML_TOPLEVEL_PATH。

export OCAML_TOPLEVEL_PATH=/Users/smcho/.opam/system/lib/toplevel

我检查了该目录是否存在,并且有一个文件topfind

这是我的 ~/.ocamlinit 文件内容。

#use "topfind"
#camlp4o
#thread
#require "core.top"
#require "core.syntax"

问题是我收到错误消息,指出找不到 topfind。

> ocaml
OCaml version 4.02.1

Cannot find file topfind.
Unknown directive `camlp4o'.
#

使用“ustop”,我没有错误消息。

可能出了什么问题?

这是我的 ocaml 环境设置。

> opam config env
CAML_LD_LIBRARY_PATH="/Users/smcho/.opam/system/lib/stublibs:/usr/local/lib/ocaml/stublibs"; export CAML_LD_LIBRARY_PATH;
OPAMUTF8MSGS="1"; export OPAMUTF8MSGS;
MANPATH=":/Users/smcho/.opam/system/man"; export MANPATH;
MAKELEVEL=""; export MAKELEVEL;
MAKEFLAGS=""; export MAKEFLAGS;
PERL5LIB="/Users/smcho/.opam/system/lib/perl5:"; export PERL5LIB;
OCAML_TOPLEVEL_PATH="/Users/smcho/.opam/system/lib/toplevel"; export OCAML_TOPLEVEL_PATH;
PATH="..."; export PATH;

最佳答案

如上所述here作者:萨莫斯:

Normally this issue does not exist anymore if you are not using the system compiler. If you are using the system compiler, you can modify you ~/.ocamlinit to load $OCAML_TOPLEVEL_PATH as done in https://github.com/OCamlPro/opam/blob/master/shell/dot_ocamlinit

因此您可以使用不同的开关或修改 .ocamlinit

关于ocaml命令行找不到 "topfind",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28749035/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com