Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] Interfacing C++ and Ocaml
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Bruce Hoult <bruce@h...>
Subject: Re: [Caml-list] Interfacing C++ and Ocaml
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