caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] OCaml/C++ : STL conflicts
@ 2001-04-22 17:58 Gregoire Sutre
  0 siblings, 0 replies; only message in thread
From: Gregoire Sutre @ 2001-04-22 17:58 UTC (permalink / raw)
  To: caml-list; +Cc: Rupak Majumdar

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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2001-04-23 11:52 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-04-22 17:58 [Caml-list] OCaml/C++ : STL conflicts Gregoire Sutre

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).