English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

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: 2001-03-30 (09:24)
From: Fergus Henderson <fjh@c...>
Subject: Re: [Caml-list] Interfacing C++ and Ocaml
On 30-Mar-2001, Bruce Hoult <bruce@hoult.org> wrote:
> 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 

In particular defining the C++ functions in your adaptor code
as `extern "C"' so that they can be called from C code.

Fergus Henderson <fjh@cs.mu.oz.au>  |  "I have always known that the pursuit
                                    |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.
To unsubscribe, mail caml-list-request@inria.fr.  Archives: http://caml.inria.fr