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 mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by yquem.inria.fr (Postfix) with ESMTP id 1CDB2BC6B for ; Thu, 10 Jan 2008 09:06:01 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAAM5ghUdA6aa2i2dsb2JhbACQHQEBAQgEBCQFkmmGFw X-IronPort-AV: E=Sophos;i="4.24,265,1196636400"; d="scan'208";a="21077649" Received: from py-out-1112.google.com ([64.233.166.182]) by mail4-smtp-sop.national.inria.fr with ESMTP; 10 Jan 2008 09:06:00 +0100 Received: by py-out-1112.google.com with SMTP id v53so696128pyh.33 for ; Thu, 10 Jan 2008 00:05:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; 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; bh=frw9rhC2bk2hwYxDSS3MlFw2n4mu8hiJN/IucN+m+mI=; b=w1CScqdL/8YFAFCWuYpFBi5F4NtsxiexmF18fSCqtAewUpYnO3LfgCxfjmA/flwk43eABh5nRyNB0HnIqOFIwDnRZp/U+4Xmz0OewkaTyNXKYFD9Hx4GNPIgTrUx5zGEDyqs85nnWKJrQyf9hgal/Ntx8XsdOjbPyvY9+EWR084= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=INOA+0G99RBgVUbCLy+MGHAkgpQ3ObLr2FwUX1uBYhraPsoc4tgZiHEKKX1nEBQaKiuoyBCTTl+Xvj4nuTXgPSfEH6jkSWC0I3GY3GX3Ng5y4cl05n1hBDv72U6Y1jndColO6tZ1YH4afZSTP6IcJ9vEypXxDBt6iOrBK3LC1os= Received: by 10.64.91.15 with SMTP id o15mr3669394qbb.57.1199952359164; Thu, 10 Jan 2008 00:05:59 -0800 (PST) Received: by 10.65.158.5 with HTTP; Thu, 10 Jan 2008 00:05:59 -0800 (PST) Message-ID: <9f09a07a0801100005n5061a656ubbf7620e48e298ee@mail.gmail.com> Date: Thu, 10 Jan 2008 09:05:59 +0100 From: "Matthieu Dubuget" To: "Caml Mailing List" Subject: Re: [Caml-list] simple example of using ocamlbuild with C Cc: "Ashish Agarwal" In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: X-Spam: no; 0.00; matthieu:01 dubuget:01 matthieu:01 dubuget:01 ocaml:01 byte:01 -custom:01 ocaml:01 endline:01 byte:01 stdio:01 stdlib:01 mlvalues:01 mlvalues:01 alloc:01 ---- myocamlbuild.ml ------ open Ocamlopen Ocamlbuild_plugin open Command ;; dispatch begin function | After_rules -> flag ["link"; "ocaml"; "byte"] (A"-custom"); dep ["link"; "ocaml"; "use_my_math"] ["avg.o"]; | _ -> () end ---- _tags ----- (do not forget the endline before end of file) : use_my_math ++++++++++++++++ Works for me. Salutations P.S. I had to modify the beginning of ---- avg.c --- #include #include #include #include into ---- avg.c --- #include #include #include