2017-01-04 9 views
0

Я пытался использовать libsvm в проекте OCaml:Невозможно использовать libsvm с OCaml

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 
+1

вы попробуйте передать -thread в ocamlfind? см. http://projects.camlcity.org/projects/dl/findlib-1.7.1/doc/guide-html/x265.html –

+0

Это сработало, если вы можете опубликовать его в качестве ответа, я проверю его :) – RUser4512

ответ

2

Вы должны проинструктировать ocamlfind выбрать нить, освобождает от gving ему вариант -thread или -vmthread - см ocamlfind