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=UNPARSEABLE_RELAY autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by yquem.inria.fr (Postfix) with ESMTP id 9C342BB84 for ; Tue, 23 Sep 2008 11:15:52 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ai0CAKpQ2EjAEhMGmmdsb2JhbACTHwEBAQEBCAsKBxEFP6MRgWY X-IronPort-AV: E=Sophos;i="4.32,451,1217800800"; d="scan'208";a="29486372" Received: from discorde.inria.fr ([192.93.2.38]) by mail4-smtp-sop.national.inria.fr with ESMTP; 23 Sep 2008 11:15:52 +0200 Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id m8N9FpPG029978 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=OK) for ; Tue, 23 Sep 2008 11:15:52 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ai0CAKpQ2EjAEhMGmmdsb2JhbACTHwEBAQEBCAsKBxEFP6MRgWY X-IronPort-AV: E=Sophos;i="4.32,451,1217800800"; d="scan'208";a="29486368" Received: from sineb-mail-1.sun.com ([192.18.19.6]) by mail4-smtp-sop.national.inria.fr with ESMTP; 23 Sep 2008 11:15:48 +0200 Received: from fe-apac-06.sun.com (fe-apac-06.sun.com [192.18.19.177] (may be forged)) by sineb-mail-1.sun.com (8.13.6+Sun/8.12.9) with ESMTP id m8N9FbjU015006 for ; Tue, 23 Sep 2008 09:15:46 GMT Received: from conversion-daemon.mail-apac.sun.com by mail-apac.sun.com (Sun Java System Messaging Server 6.2-6.01 (built Apr 3 2006)) id <0K7N00F015NXLH00@mail-apac.sun.com> (original mail from Xue-Yang.Yan@Sun.COM) for caml-list@inria.fr; Tue, 23 Sep 2008 17:15:37 +0800 (SGT) Received: from [129.158.218.53] by mail-apac.sun.com (Sun Java System Messaging Server 6.2-6.01 (built Apr 3 2006)) with ESMTPSA id <0K7N0009B5Q0W7QP@mail-apac.sun.com>; Tue, 23 Sep 2008 17:15:37 +0800 (SGT) Date: Tue, 23 Sep 2008 17:09:58 +0800 From: bill yan Subject: Re: [Caml-list] What's the purpose of the static library? In-reply-to: <48D766CC.5020401@glondu.net> Sender: Xue-Yang.Yan@Sun.COM To: =?UTF-8?B?U3TDqXBoYW5lIEdsb25kdQ==?= Cc: caml-list@inria.fr Message-id: <48D8B266.4000906@sun.com> MIME-version: 1.0 Content-type: text/plain; format=flowed; charset=UTF-8 Content-transfer-encoding: 8BIT X-Accept-Language: zh-cn References: <48D712A8.6090506@sun.com> <48D766CC.5020401@glondu.net> User-Agent: Mozilla/5.0 (X11; U; SunOS i86pc; zh-CN; rv:1.7) Gecko/20060627 X-Miltered: at discorde with ID 48D8B3C7.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; ocaml:01 ocaml:01 usr:01 lib:01 bigarray:01 cmxa:01 lib:01 stubs:01 native-code:01 bytecode:01 -custom:01 cheers:01 phane:98 phane:98 caml-list:01 Hi Stéphane, Thanks a lot for your information. And we'd like to know more about the OCaml library architectures, like on what situation dynamic libraries are used, and when static libraries are used, and so on.. Really appreciate if you could point me to a document that can help on this topic. Regards, Bill Stéphane Glondu 已写入: > bill yan a écrit : > >> I noticed there are some static libraries(.a) installed with ocaml, for >> example, /usr/lib/ocaml/bigarray.a. What's the purpose of those static >> libraries? Thanks a lot. > > > They contain (natively) compiled OCaml code. An OCaml library compiled > in native mode (usually) consists of a .a and a .cmxa file, the former > containing OCaml-specific information. > > They are not to be confused with lib*.a files, which contain compiled > C stubs, and are needed for generating native-code executables, and > bytecode ones in -custom mode. > > > Cheers, >