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=AWL 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 0AF8CBC69 for ; Sat, 27 Oct 2007 18:46:01 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ao8CAGIII0dQRFuw/2dsb2JhbAA X-IronPort-AV: E=Sophos;i="4.21,337,1188770400"; d="scan'208";a="5202515" Received: from furbychan.cocan.org ([80.68.91.176]) by mail3-smtp-sop.national.inria.fr with ESMTP; 27 Oct 2007 18:46:00 +0200 Received: from rich by furbychan.cocan.org with local (Exim 3.35 #1 (Debian)) id 1IlonJ-00071j-00; Sat, 27 Oct 2007 17:45:53 +0100 Date: Sat, 27 Oct 2007 17:45:53 +0100 To: Daniel =?iso-8859-1?Q?B=FCnzli?= Cc: Christopher L Conway , caml-list Subject: Re: [Caml-list] Camlidl questions Message-ID: <20071027164553.GA26579@furbychan.cocan.org> References: <4a051d930710261336r33a4d3aycda32880c1663953@mail.gmail.com> <3596AC1F-C054-44AC-96E6-2C95E1072F23@erratique.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <3596AC1F-C054-44AC-96E6-2C95E1072F23@erratique.ch> User-Agent: Mutt/1.5.9i From: Richard Jones X-Spam: no; 0.00; camlidl:01 0200,:01 bunzli:01 camlidl:01 bug:01 bindings:01 lablgl:01 bindings:01 ocaml's:01 chap:98 hacks:01 wrote:01 caml-list:01 interfaces:01 floats:02 On Sat, Oct 27, 2007 at 10:43:46AM +0200, Daniel Bünzli wrote: > Le 26 oct. 07 à 22:36, Christopher L Conway a écrit : > >I'm trying to write an interface to an existing C library using > >Camlidl and I'm having trouble in just a few cases... > > I'd say don't use camlidl. It seems to be unsupported software. There > is for example a bug the handling of records of floats only that I > reported a long time ago but was lost in the bugtracker update. I > guess it wasn't fixed. > > Try to understand the caml-c interface (chap. 18 of the manual) and > then use C pre-processor hacks to streamline the development of your > bindings, have a look at lablgl to see what I mean by that. Absolutely agreed. While I think there is room for someone to _really_ tackle the issue of building interfaces to C automatically (using something like CIL and a bucket-load of meta-information about how the C library deals with memory), until that day comes it's just much better to write the bindings by hand. I've used the native interface APIs for several languages including Java, Perl and Python, but OCaml's is by far the easiest. Well, maybe apart from C++ :-) Rich. -- Richard Jones Red Hat