Having successfully reorganized my project for ocamlbuild with subdirectories and using ocamlfind, I've found it difficult to build the top-level.
I've constructed a .mltop
file containing all the modules that would be included and added the packages to the _tags
, but the build doesn't work. It cannot find the C functions that are compiled with one of the modules. With -classic-display
on, I can see that file, libcside.a
, not being included and isn't even being compiled at all! The c file is added as a dependency in myocamlbuild.ml
by,
flag ["link"; "ocaml"; "use_cutil"] (S [A"-cclib"; A"-L."; ]);
dep ["link"; "ocaml"; "use_cutil"] ["libcside.a"];
and in _tags
,
<utilities.*> : use_cutil
<**/*.top> : use_str, use_unix, use_cutil, use_curl, use_mysql
and, finally, in libcside.clib
,
cutil.o
I'm missing something in setting up the build for the top level, but I cannot find a reliable resource online. Thanks.