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
Best way to choose an implementation of a lib ?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2005-11-30 (16:09)
From: Daniel_Bünzli <daniel.buenzli@e...>
Subject: Re: [Caml-list] How to compile different implementations of the same lib

Le 30 nov. 05 à 15:38, Daniel Bünzli a écrit :

> Le 30 nov. 05 à 13:19, Jacques Garrigue a écrit :
>> Note that with native code you must be careful to compile without any
>> .cmx around (only .cmi's), as this would induce dependencies on a
>> specific version. This also means that you lose inlining (one major
>> advantage of native code.)
> I don't understand this. Careful to compile what without which cmx  
> around ? And where do you lose inlining ?

Now I think I understand this. You mean when you compile client code against the library. Then functions from the lib will not  
be inlined in client code. This allows to switch implementations of  
the library without recompiling More precisely, if you  
statically link with the lib you only need to relink and if you  
dynamically link you don't even need to do anything, you can just  
play with CAML_LD_LIBRARY_PATH. Right ?