From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id PAA25575; Thu, 15 Jul 2004 15:31:30 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id PAA25153 for ; Thu, 15 Jul 2004 15:31:28 +0200 (MET DST) Received: from isis.lip6.fr (isis.lip6.fr [132.227.60.2]) by concorde.inria.fr (8.12.10/8.12.10) with ESMTP id i6FDVSSH027396 for ; Thu, 15 Jul 2004 15:31:28 +0200 Received: from spi.lip6.fr (spi.lip6.fr [132.227.83.193]) by isis.lip6.fr (8.12.11/jtpda-5.4+victor) with ESMTP id i6FDVRB7013150 ; Thu, 15 Jul 2004 15:31:27 +0200 X-pt: isis.lip6.fr Received: from portableblondj.lip6.fr (portableblondj.lip6.fr [132.227.83.228]) by spi.lip6.fr (8.11.6/jtpda-5.2) with ESMTP id i6FDVMm13354 ; Thu, 15 Jul 2004 15:31:22 +0200 From: Julius Reply-To: flute@noos.fr To: caml-list@inria.fr Subject: [Caml-list] Interfacing C with Ocaml Date: Thu, 15 Jul 2004 15:31:22 +0200 User-Agent: KMail/1.5.3 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200407151531.22817.flute@noos.fr> X-Scanned-By: isis.lip6.fr X-Miltered: at concorde with ID 40F68730.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; interfacing:01 ocamlidl:01 opaque:01 struct:01 foo:01 toto:01 foo:01 tryed:01 avoiding:01 pointers:01 toto:01 char:01 char:01 compiler:01 idl:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Hello, I'am using ocamlidl to build an interface from custom C header but I have some problems (sorry if they are trivial)... First, the following opaque structure definition doesn't pass the compilation stage (dereferencing pointer to incomplete type) : typedef struct foo toto; I thought this appens because C compiler doesn't know the size of foo structure. I tryed to define my own ml2c and c2ml functions (avoiding the problem by using pointers toto*) but I don't see how i can convert C pointer to Caml value... Second, I have to give an IDL description of this awful thing... typedef int (*foo_fun)(void*, int, char**, char**); ... and I really don't see how to do that. Is anyone can help me? Thanks a lot :) Julien Blond ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners