Version française
Home     About     Download     Resources     Contact us    
Browse thread
linking errors involving cpp files
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Basile STARYNKEVITCH <basile@s...>
Subject: Re: [Caml-list] linking errors involving cpp files
Jan Kybic wrote:
> On Tue, Dec 15, 2009 at 2:50 PM, Aaron Bohannon <bohannon@cis.upenn.edu> wrote:
>> Thanks for the tip.  This does resolve the missing caml symbols (even
>> when naming the file with a cpp extension).  However, my real program
>> actually uses some C++ features.  I think I could convert it to a real
>> C program, but I assumed there would be some other way.
>>
> 
> What you can do is to create a thin C layer between your Ocaml and C++ code.
> I am including a very simple code - an interface to the Cubpack
> library in Ocaml.
> 


In addition of all the other good answers, you could look at how some existing C++ open-source libraries interface to Ocaml.

Both the Parma Polyhedra Library (PPL, under GPLv3 licence), at http://www.cs.unipr.it/ppl/ and the Low Level Virtual 
Machine library (LLVM, under a BSD-like licence) at http://llvm.org/ are free libraries, coded in C++, interfaced to Ocaml.

Regards.


-- 
Basile STARYNKEVITCH         http://starynkevitch.net/Basile/
email: basile<at>starynkevitch<dot>net mobile: +33 6 8501 2359
8, rue de la Faiencerie, 92340 Bourg La Reine, France
*** opinions {are only mines, sont seulement les miennes} ***