compiler-errors - 无法将libsvm与OCaml一起使用

标签 compiler-errors ocaml libsvm lapack

我试图在OCaml项目中使用libsvm:

open Lacaml.D
open Libsvm

但是,当我尝试运行我的makefile时,我遇到了一个奇怪的错误:
ocamlfind: Error from package `threads': Missing -thread or -vmthread switch

我的makefile是:
ocamlfind ocamlopt -o prog -linkpkg -package lacaml -package libsvm Example1.ml

我确保所有软件包都存在(使用depext):
# Installed packages for system:
base-bigarray             base  Bigarray library distributed with the OCaml compiler
base-bytes                base  Bytes library distributed with the OCaml compiler
base-ocamlbuild           base  OCamlbuild binary and libraries distributed with the OCaml compiler
base-threads              base  Threads library distributed with the OCaml compiler
base-unix                 base  Unix library distributed with the OCaml compiler
[...]
lacaml                   8.1.1  OCaml-bindings to BLAS and LAPACK.
lbfgs                    0.8.8  Minimization of multidimensional functions on bounded or unbounded domains.
libsvm                   0.9.3  LIBSVM bindings for OCaml

最佳答案

您必须通过给它选项-thread或-vmthread来指示ocamlfind选择线程库-请参见ocamlfind

关于compiler-errors - 无法将libsvm与OCaml一起使用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41471283/

相关文章:

python - Sklearn LinearSVC 库中惩罚和损失参数的区别

matlab - 为 LIBSVM 计算 C 和 Gama

c++ - '...' 不是类型 C++ 编译错误

c++ - 错误 C2600 : what does this means?

Ocaml 嵌套函数

ocaml - 有没有办法将空元素添加到 OCaml 中的列表中?

machine-learning - Libsvm 预计算内核

c++ - 无法在 lambda 中捕获

ios - Apple Mach-O错误Xcode-真的很困惑

include - OCaml 中的多态仿函数(与 Include 命令相关)