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=1.2 required=5.0 tests=AWL,SPF_NEUTRAL autolearn=disabled version=3.1.3 Received: from discorde.inria.fr (discorde.inria.fr [192.93.2.38]) by yquem.inria.fr (Postfix) with ESMTP id 051AEBC69 for ; Sun, 25 Mar 2007 12:17:30 +0200 (CEST) Received: from nz-out-0506.google.com (nz-out-0506.google.com [64.233.162.226]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id l2PAHTK7002108 for ; Sun, 25 Mar 2007 12:17:29 +0200 Received: by nz-out-0506.google.com with SMTP id l8so1252511nzf for ; Sun, 25 Mar 2007 03:17:28 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=AGh3bX4cZMf4pA0HECgEGGy2CA4nLY545wgpuTy4QT+cDGUJz03MaC3zYPVsUYoRgewkXNiNGoHAZ5d4owbz3PKgpxo/hFayofn3QV0xu0fxWpzzSw8jdVHEGjqDvpqqgX3iO6J5ibxYkoqcjPSvv/PblxzMD58iNzmaTZJzzXs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=JRhScMDWfMGejmzSBkHGLtBeowXzeIVWbJ/Lt5Oi0Qz09RRoT2G935mVV2K/w1ZrEi7RCfkJGS911uD46s0VTBvFQklZZ1/s0tNOM0hVs8Ggl42cPTbLKgD4kNEZE62oQDk2uqeRQoi4EObmDWnZwml6RPQ26Ay0/SB90wvGniU= Received: by 10.114.126.1 with SMTP id y1mr2084072wac.1174817848503; Sun, 25 Mar 2007 03:17:28 -0700 (PDT) Received: by 10.114.183.4 with HTTP; Sun, 25 Mar 2007 03:17:28 -0700 (PDT) Message-ID: Date: Sun, 25 Mar 2007 11:17:28 +0100 From: "Nicolas Pouillard" To: "Christian Sternagel" Subject: Re: [Caml-list] documentation for building C++ libraries with ocamlbuild Cc: caml-list@inria.fr In-Reply-To: <20070324185823.GA10280@pc6197-c703.uibk.ac.at> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20070324185823.GA10280@pc6197-c703.uibk.ac.at> X-j-chkmail-Score: MSGID : 46064C39.000 on discorde : j-chkmail score : X : 0/20 1 0.000 -> 1 X-Miltered: at discorde with ID 46064C39.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; lib:01 libfoo:01 foo:01 libfoo:01 lib:01 byte:01 foo:01 ocaml:01 -custom:01 -cclib:01 ocaml:01 compilation:01 wrote:01 caml-list:01 declaration:02 Sorry, my first mail is unfinished... On 3/24/07, Christian Sternagel wrote: > Is there some documentation or at least a tutorial for how to setup ocamlbuild in order to build a lib.a file from a bunch of *.c, *.C, and *.h files? Roughly... $ cat libfoo.clib foo1.o bar2.o ... $ ocamlbuild libfoo.a > And after having done that, how to tell ocamlbuild that some ocmal-program which is build depends on lib.a. $ cat _tags flag ["ocaml"; "link"; "use_foo"] (S[A"-cc"; A"g++"; A"-ccopt"; A"-Lfoo"; A"-custom"; A"-cclib"; A"-Ifoo"]); dep ["ocaml"; "link"; "use_foo") ["libfoo.a"] end;; Some `flag' declaration might be useful in order to tweak the C/C++ compilation. -- Nicolas Pouillard