使用OCaml 4.02.0标记标签警告

使用OCaml 4.02.0标记标签警告,ocaml,ocamlbuild,Ocaml,Ocamlbuild,我正在使用OCaml 4.02(使用opam)尝试我的代码,我收到了很多类似这样的警告: File "_tags", line 14, characters 121-134: Warning: the tag "link(utils.o)" is not used in any flag declaration, so it will have no effect; it may be a typo. Otherwise use `mark_tag_used` in your myocamlbu

我正在使用OCaml 4.02(使用opam)尝试我的代码,我收到了很多类似这样的警告:

File "_tags", line 14, characters 121-134:
Warning: the tag "link(utils.o)" is not used in any flag
declaration, so it will have no effect; it may be a typo.
Otherwise use `mark_tag_used` in your myocamlbuild.ml to
disable this warning.
但是它是在myocamlbuld.ml中定义的:

pdep ["link"] "link" (fun param -> [param]);
我可以通过以下方法摆脱它:

mark_tag_used("link(utils.o)");
但是每次使用标签我都需要一行这样的代码!此外,我的代码不会使用早期版本的OCaml构建。总的解决办法是什么


(完整代码位于)

我删除了相同的警告

dispatch @@ MyOCamlbuildBase.dispatch_combine [
  begin function
    (* ... *)
  end;
  dispatch_default
]
;;
而不是

dispatch 
begin function (* ... *)

在my
myocamlbuild.ml
中重新运行
oasis安装程序
。YMMV

我用4.02.0编译了我的一个项目,在实际使用的许多标记上得到了相同的警告。我还没看太多,但很好奇你是否找到了原因。不,我还没有。我回到了4.01.0,因为编译速度慢的问题(我听说将在4.02.1中修复),这似乎是一个到目前为止尚未报告的ocamlbuild错误。您可以随意报告此类问题。我将此报告为,现在应该已修复。很有趣,但我没有使用OASIS,只使用普通的
ocamlbuild