From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by yquem.inria.fr (Postfix) with ESMTP id C07A8BB84 for ; Tue, 23 Sep 2008 14:50:14 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArEDAFCD2EjAXQIniGdsb2JhbACTIwEBARUinFWHAjyBZw X-IronPort-AV: E=Sophos;i="4.32,452,1217800800"; d="scan'208";a="17259255" Received: from concorde.inria.fr ([192.93.2.39]) by mail3-smtp-sop.national.inria.fr with ESMTP; 23 Sep 2008 14:49:49 +0200 Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id m8NCnleH021972 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=OK) for ; Tue, 23 Sep 2008 14:49:49 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AtcCANaC2EhQW+UCgWdsb2JhbACTIwEBFiIEnE+HAjyBZw X-IronPort-AV: E=Sophos;i="4.32,452,1217800800"; d="scan'208";a="15260091" Received: from main.gmane.org (HELO ciao.gmane.org) ([80.91.229.2]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/AES256-SHA; 23 Sep 2008 14:49:48 +0200 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1Ki7Kt-0003dm-OB for caml-list@inria.fr; Tue, 23 Sep 2008 12:49:47 +0000 Received: from cpe-69-203-209-238.nyc.res.rr.com ([69.203.209.238]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 23 Sep 2008 12:49:47 +0000 Received: from cconway by cpe-69-203-209-238.nyc.res.rr.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 23 Sep 2008 12:49:47 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: caml-list@inria.fr From: Chris Conway Subject: Re: What's the purpose of the static library? Date: Tue, 23 Sep 2008 12:49:38 +0000 (UTC) Message-ID: References: <48D712A8.6090506@sun.com> <48D766CC.5020401@glondu.net> <48D8B266.4000906@sun.com> <20080923101710.GA29133@annexia.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: main.gmane.org User-Agent: Loom/3.14 (http://gmane.org/) X-Loom-IP: 69.203.209.238 (Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.1) Gecko/2008072820 Firefox/3.0.1) Sender: news X-Miltered: at concorde with ID 48D8E5EB.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; cmo:01 bytecode:01 'ocamlc:01 ml':01 bytecode:01 toplevel:01 dynlink:01 cmo:01 'ocamlc:01 wiki:01 cmxa:01 cmx:01 compiler:01 compilation:01 faq:01 Richard Jones annexia.org> writes: > <...> > File: module.cmo ------------------------------ > > Contains the bytecode of the implementation of Module. > > Created by: 'ocamlc -c module.ml' > > Used: When linking bytecode programs, or creating bytecode libraries > (*.cma), or by the toplevel when you use #load, or by Dynlink. > > File: library.cma ------------------------------ > > This is just a set of *.cmo files combined together. > > Created by: 'ocamlc -a' > > Used: Same as for module.cmo Richard, This is a wonderful answer! It should go onto the wiki or in the FAQ. One nitpick... .cma (and .cmxa) files should not be used for creating libraries (as .cmo and .cmx files can (and should) be). I.e., don't like a library into a library. Doing so will give a compiler error: X.cma is not a compilation unit description. Regards, Chris