Version française
Home     About     Download     Resources     Contact us    
Browse thread
Linking order with Ocamlbuild
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Dario Teixeira <darioteixeira@y...>
Subject: Linking order with Ocamlbuild

Hi,

I am using the custom myocamlbuild.ml for ocamlfind support that is listed
in the Ocamlbuild wiki [1].  I would like to separate the list of packages
used for compilation and for linking; and in the latter case I would like
to provide an explicit linking order.  This is what I'm currently listing
in _tags:

<**/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?

Thanks for your thoughts!
Cheers,
Dario

[1] http://brion.inria.fr/gallium/index.php/Using_ocamlfind_with_ocamlbuild