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
What's the purpose of the static library?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2008-09-24 (20:09)
From: Sylvain Le Gall <sylvain@l...>
Subject: Re: What's the purpose of the static library?
On 23-09-2008, Richard Jones <rich@annexia.org> wrote:
> On Tue, Sep 23, 2008 at 05:09:58PM +0800, bill yan wrote:
> Files: module.o and module.cmx --------------------
> These two files go together.  The *.o file contains compiled native
> code in the normal system object file format.  The *.cmx file contains
> metainformation about the machine code in the *.o file.
> Created by: 'ocamlopt -c module.ml'
> Used: When linking native code programs, or creating native code
> libraries.
> Note(1): You normally never need to specify the *.o files by hand.  On
> the command line when the compiler sees a *.cmx file, it looks for the
> corresponding *.o file if it needs it.
> Note(2): It is thought that the *.cmx file needs to be around even
> when linking a library (*.cmxa) file in order to do cross-module
> function inlining.  Both the Debian & Fedora packaging rules specify
> that *.cmx files be kept around for this reason.  Whether this is
> really true or not is not certain.

Do you think *.cmx and *.o should be shipped?

Is *.cmx enough?

Sylvain Le Gall