Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

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: 2009-07-07 (16:11)
From: Dario Teixeira <darioteixeira@y...>
Subject: Linking order with Ocamlbuild


I am using the custom 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!