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.1 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 7F20DBC69 for ; Sun, 25 Mar 2007 12:13:25 +0200 (CEST) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.168]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id l2PADPep001488 for ; Sun, 25 Mar 2007 12:13:25 +0200 Received: by ug-out-1314.google.com with SMTP id k3so1321857ugf for ; Sun, 25 Mar 2007 03:13:25 -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=oNCh67l4q127lBh1/mGLugDWoMLeEtfTm2cnqxUpqSgbstWRnR19/HpiXClF2NqSFMMabtHcojV8Dd+bP7KK3mUfiBZa5+PGsMoWOq/mpk2jPOCX4k4e1j1qDDxYPZxY8rzZiHvDS/2sPTISs/jBPQ0ZIMXNZ3ERXc3jFS+QJWY= 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=EBRoAx6PDNePD3pp8ksEEKVOsfLH3jhQmhSOGIPohTL7U0Q5Qai1Fq6/tSyWNBHllcVJbpSbdf/WeKyUaFwyEklAg66YVvb/0WEEDMaCPvYnhaIrvHL5ie0acaLqu4M7zQwJ4EuJxYaQsKdAjL4UjLBhasef4S+X7AnZuOD9ihs= Received: by 10.114.197.1 with SMTP id u1mr2084420waf.1174817604172; Sun, 25 Mar 2007 03:13:24 -0700 (PDT) Received: by 10.114.183.4 with HTTP; Sun, 25 Mar 2007 03:13:24 -0700 (PDT) Message-ID: Date: Sun, 25 Mar 2007 11:13:24 +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 : 46064B45.000 on discorde : j-chkmail score : X : 0/20 1 0.000 -> 1 X-Miltered: at discorde with ID 46064B45.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 makefile:01 compiler:01 ocamlc:01 -custom:01 cmo:01 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? $ 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"] (SA"-cc"; A"g++"; A"-ccopt"; A"-Lfoo"; A"-custom"; A"-cclib"; A"-Ifoo" > > Currently I build lib.a using a Makefile and the g++ compiler. After that I create a .cma like > > ocamlc -cc g++ -ccopt -L -a -o .cma -custom \ > -cclib -l > > Then I compile the program using the ocaml-interfaced C++ library like > > ocamlc -cc g++ -o -ccopt -L.a> \ > -cclib -l .cma > > For each of the 3 steps I need a different Makefile and almost always when something changes I have to do the cumbersome > make clean; make depend; make cycle to avoid any compile errors > like inconsistent assumptions over interfaces. There should be an easier way, shouldn't it? > > cheers > > christian > > _______________________________________________ > Caml-list mailing list. Subscription management: > http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list > Archives: http://caml.inria.fr > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > Bug reports: http://caml.inria.fr/bin/caml-bugs > -- Nicolas Pouillard aka Ertai http://uttk.org Uttk -- Unified Test Tool Kit