On Tue, 7 Jul 2009 09:11:23 -0700 (PDT) Dario Teixeira wrote: > <**/main.native>: pkg_a, pkg_b, pkg_c > <**/*.ml>: pkg_b, pkg_c > > Which is neither particularly pretty nor actually working. Namely, during > the linking stage, ocamlbuild is invoking "-package b -package a". This is > in the wrong order, and different from the one I specified. Is there any > straightforward way to fix it? As far as I observed ocamlbuild preserves the same order of libraries at the linking stage that was used when introducing those libraries in myocamlbuild.ml (namely with ocaml_lib). So try to sort the output of find_packages as you need. -- ygrek