gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-12-02 10:51:21 25 4
gpt4 key购买 nike

我试图在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/

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