English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

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-11 (07:46)
From: ygrek <ygrekheretix@g...>
Subject: Re: [Caml-list] Linking order with Ocamlbuild
On Tue, 7 Jul 2009 09:11:23 -0700 (PDT)
Dario Teixeira <darioteixeira@yahoo.com> 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.