Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] OCaml/C++ : STL conflicts
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Gregoire Sutre <sutre@i...>
Subject: [Caml-list] OCaml/C++ : STL conflicts
Hi,

I would like to use a C++ library in an OCaml program.  Fortunately, the
linking problems were solved quite easily:

(1) declaring each external C++ function as extern "C"
(2) enlosing the caml/* includes inside an extern "C"
(3) specifying the C++ compiler with the -cc option of ocamlc/ocamlopt

But I have not tested thoroughly yet.  Do you believe that there might be
problems with this approach?

Regarding (2) above, I was by the way surprised that the caml/* header
files did not use the usual construct:

#ifdef __cplusplus
extern "C" {
#endif

-------------------
To unsubscribe, mail caml-list-request@inria.fr.  Archives: http://caml.inria.fr