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
Calling C++ from OCaml
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2010-02-15 (16:45)
From: Roberto Bagnara <bagnara@c...>
Subject: Re: [Caml-list] Calling C++ from OCaml
On 02/15/10 17:32, Jean Yang wrote:
>    I've been trying to call C++ from OCaml by using OCaml's external C
> interface to call C functions that call the mangled-name version of the
> C++ functions.  I've been running into trouble because I'm not sure how
> to specify the C++ object files to link against with ocamlc.  (I'm not
> sure how to do it using ocaml-make.)  Can anyone help?
>    Also, is this the best way to call from OCaml to C++?

I am not sure what is the best way to call C++ code from OCaml.
However, we successfully interfaced the Parma Polyhedra Library
core, which is written in C++, to OCaml.  You can fetch a source
distribution from http://www.cs.unipr.it/ppl/ and look into the
interfaces/OCaml directory.
Hope it helps,


Prof. Roberto Bagnara
Applied Formal Methods Laboratory
Department of Mathematics, University of Parma, Italy