Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
Camlidl questions
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2007-10-27 (16:46)
From: Richard Jones <rich@a...>
Subject: Re: [Caml-list] Camlidl questions
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++ :-)


Richard Jones
Red Hat