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
[Caml-list] Big executables from ocamlopt; dynamic libraries again
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2002-03-18 (10:12)
From: Nicolas George <>
Subject: Re: [Caml-list] Big executables from ocamlopt; dynamic libraries again
L'octidi 28 ventôse, an CCX, Tim Freeman a écrit :
> I see the same sort of thing happening in /usr/lib/ocaml/stdlib.a, so
> lablgtk is not alone there.  If you make an object, you load oo.o from
> stdlib.a, which defines an unrelated function that uses random
> numbers, so static linking then grabs random.o.  

Something I dislike in OCaml since a lot of time is the mixing of
modules of compilation units. Why should a module be in only one file? A
solution to that could be an additionnal feature to the compiler:

ocamlc -m -o module.cmi module1.cmi module2.cmi module3.cmi

Then the module.cmi interface would hold all the values and types of
module[123].cmi, along with a special information (like the external
information): "to find the foobar value, you must look in the module2

So huge modules could be split into smaller compilation --and linking--