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
generating .cma-files with ocamlbuild
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2007-03-24 (15:11)
From: Christian Sternagel <Christian.Sternagel@u...>
Subject: generating .cma-files with ocamlbuild
Is there an easy way to tell ocamlbuild that it should
take some *.ml and *.mli files and build an archive
<name>.cma out of them?

Btw: I have another question concerning *.cma files.
Maybe an example is the easiest way to express this

There are files:
set.mli a.mli

I want to create the file util.cma which contains
set.cmo, setInternal.cmo, and a.cmo.

set.cmo uses setInternal.cmo but the user should
only be able to access modules Set and A but not
SetInternal. As far as I understud, this is done by
just providing set.cmi and a.cmi together with

1) Is my understandung correct?
2) Can there be a problem if somebody using util.cma
(who does not know, that setInternal.cmo is part of
it) uses a self-made module by the name SetInternal
in his application?