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 LAA27036; Fri, 30 Mar 2001 11:14:08 +0200 (MET DST) Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id LAA26811 for ; Fri, 30 Mar 2001 11:14:08 +0200 (MET DST) Received: from smtp2.ihug.co.nz (smtp2.ihug.co.nz [203.109.252.8]) by nez-perce.inria.fr (8.11.1/8.10.0) with ESMTP id f2U9E1913453 for ; Fri, 30 Mar 2001 11:14:06 +0200 (MET DST) Received: from [192.168.0.12] (p26-max1.wlg.ihug.co.nz [203.173.230.26]) by smtp2.ihug.co.nz (8.9.3/8.9.3/Debian 8.9.3-21) with ESMTP id VAA28437; Fri, 30 Mar 2001 21:13:36 +1200 X-Authentication-Warning: smtp2.ihug.co.nz: Host p26-max1.wlg.ihug.co.nz [203.173.230.26] claimed to be [192.168.0.12] Mime-Version: 1.0 X-Sender: bruce@209.163.245.148 Message-Id: In-Reply-To: <3AC449BF.A91A54E8@irit.fr> References: <3AC449BF.A91A54E8@irit.fr> Date: Fri, 30 Mar 2001 21:13:04 +1200 To: David Chemouil , caml-list@inria.fr From: Bruce Hoult Subject: Re: [Caml-list] Interfacing C++ and Ocaml Content-Type: text/plain; charset="us-ascii" ; format="flowed" Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk At 10:54 AM +0200 3/30/01, David Chemouil wrote: >Hi, > > > >I am in the situation where I would like to write an Ocaml program which >makes use of some C++ classes. It seems to me some people had said there >were some problems doing so, but I can't recall what these problems may >be, and didn't find anything precise in the ML archive. > >So, I would like to know what may prevent me to reuse C++ code from >Ocaml, if anything may. I am sure some arrangements can be done, as >there exists an Ocaml implementation on BeOS, which is programmed in >C++. I'm no expert on Caml, so maybe the wizards have done something clever, but interfacing other languages to C++ is normally best done by writing an adaptor in C++ that provides a pure C interface to the C++ code (usable by C code, compiled by a C compiler, not C++), and then call *that* from your favourite language. -- Bruce ------------------- To unsubscribe, mail caml-list-request@inria.fr. Archives: http://caml.inria.fr