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
ocamlbuild and installed modules and libraries
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2008-11-17 (09:21)
From: Daniel_Bünzli <daniel.buenzli@e...>
Subject: Re: [Caml-list] ocamlbuild and installed modules and libraries

Le 16 nov. 08 ŕ 21:37, Nicolas Pouillard a écrit :

> I'm a bit uncomfortable with this kind of dynamic or special tags.
> However the simplest solution to your problem is probably one of  
> those:
>  1/ ocamlbuild -cflags -I,+xmlm,xmlm.cmx test.native

You meant,

> ocamlbuild -cflags -I,+xmlm -lflags -I,+xmlm,xmlm.cmx test.native

I still think using ocamlbuild with installed libraries/modules is a  
little bit problematic. If we have to do it that way [1] we are hard- 
coding the location of the library in the plugin which doesn't feel  

For me there should be (1) a way of defining the dependency on a  
module/library (hopefully without needing a plugin) and (2) a way of  
defining its location (-I). These two aspects should be decoupled.  
This makes it easier to drive the installation process in build  
scripts by using environment variables, i.e. I just need
to specify the location of the module/library I depend on via a  
suitable -I $DEPDIR to compile the sources.



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