我正在使用Jane Street
的async_core
,方法是在_tags
中添加package(async_core)
。
当我使用ocamlbuild -use-ocamlfind -I src test/test_airport.native
时,它会给我以下错误:
camlfind ocamlopt -linkpkg -package async_core -package unix -package netclient -package mongo -package xml-light src/airport.cmx -package/test_airport.cmx -o测试/test_airport.native ocamlfind:来自程序包‘-thread’的错误:缺少线程或-vmthread开关
我在谷歌上搜索了一下,这是我找到的http://caml.inria.fr/pub/docs/manual-ocaml-4.00/manual039.html
上面写着:
使用系统线程的
程序必须按如下方式链接:
ocamlc -thread other options unix.cma threads.cma other files
所以我修改了ocamlbuild命令,如下所示:
ocamlbuild -use-ocamlfind -cflag -thread -I src test/test_airport.native
但是错误仍然是一样的。而且,在没有-thread
的情况下,ocamlbuild生成的实际命令也是一样的。
我该如何处理这件事?
https://stackoverflow.com/questions/16552834
复制相似问题