问题标签 [ocamlfind]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
0 回答
58 浏览

ocaml - Ocamlfind 的问题:动态加载的库出错

当我以下列方式使用 Ocamlfind 时:

/home/monnier/.opam/default/bin/ocamlfind ocamlc -linkpkg -package zarith -I + 线程 unix.cma threads.cma encryption.ml miner.ml -o miner

这给了我以下错误:

错误:动态加载的库出错:dllzarith.so:dllzarith.so:无法打开共享对象文件:没有这样的文件或目录文件“wallet.ml”,第 1 行:

然而我已经安装了 Zarith 库

在此处输入图像描述

0 投票
1 回答
59 浏览

ocaml - 在 debian Bulleye 上编译 ocaml 项目时出现问题:未定义对 shm_unlink 和 shm_open 的引用

试图从

https://gitlab.com/benjgregoire/maskverif/

我(对ocaml一无所知)在安装所有缺少的库后得到错误消息

从我在互联网上找到的内容来看,看起来库 rt 是通过 -lrt 在错误的位置提供给 gcc 链接器的,但我不知道如何解决这个问题,因为它是由一些 ocaml 二进制文件调用的。

我怎样才能解决这个问题?

0 投票
1 回答
51 浏览

ocaml - OCaml 中的逻辑回归

我试图在 OCaml 中使用逻辑回归。我需要将它用作我正在解决的另一个问题的黑盒。我找到了以下网站:

http://math.umons.ac.be/anum/en/software/OCaml/Logistic_Regression/

我将此站点中的以下代码(进行了一些修改 - 我定义了自己的 iris_features 和 iris_label)粘贴到名为logistic_regression.ml 的文件中:

我有以下问题:

  1. 在尝试编译代码时,我收到错误消息:“ Error: Unbound module Lacaml”。我已经安装了 Lacaml;做了几次 opam init,试图提供一个标志 -package = Lacaml ;我不知道如何解决这个问题?
  2. 如您所见,我已经定义了自己的 iris_features 和 iris_labels 版本——类型是否正确,即函数 log_reg 中的类型是 x int 列表,而 y 的类型是 int?
0 投票
1 回答
21 浏览

compiler-errors - 编译包含“打开 Findlib”的 Ocaml 文件时出现未绑定模块 Findlib 错误

我写了一个只包含一行代码的Ocaml文件:open Findlib,然后我保存文件并命名为test.ml。在Ocaml64(Ocaml for windows)环境中,我输入命令ocamlc -o test test.ml,出现错误:Error:Unbound module Findlib。但是如果我打开 ocaml 交互环境并这样做:

它可以工作,所以我确定存在 Findlib 库,我不知道为什么在编译包含open findlib.