Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
* How to wrap around C++?
@ 2010-02-08  2:13 Luca de Alfaro
  2010-02-08  4:06 ` Michael Ekstrand
  2010-02-08 12:38 ` [Caml-list] " Guillaume Yziquel
  0 siblings, 2 replies; 11+ messages in thread
From: Luca de Alfaro @ 2010-02-08  2:13 UTC (permalink / raw)
  To: Inria Ocaml Mailing List

[-- Attachment #1: Type: text/plain, Size: 862 bytes --]

I need to be able to call some C++ functions from my Ocaml code.
Can someone point me to some examples on how this is done?  Is it an issue
if what I need to wrap is C++, rather than the more standard C?

I also would like to know if I can do something more complex... namely, I
would like to create a C++ object, and return it to Ocaml.
Ocaml then needs to be able to call methods of that object.  The object does
not need to be directly accessible from Ocaml, but it needs to be
persistent, so that all Ocaml calls refer to the same object.

Essentially, the C++ object implements access to a file via some
compression, etc, mechanism.  In C++, one creates the object, calls write
and read methods, calls the method for closing the file, and deletes the
object.

How can I wrap around such an object in Ocaml?  Is it possible?  Any
advice?

Many thanks,

Luca

[-- Attachment #2: Type: text/html, Size: 1031 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2010-02-09  6:53 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-02-08  2:13 How to wrap around C++? Luca de Alfaro
2010-02-08  4:06 ` Michael Ekstrand
2010-02-08  4:17   ` Michael Ekstrand
2010-02-08 16:03   ` [Caml-list] " Luca de Alfaro
2010-02-08 16:33     ` Luca de Alfaro
2010-02-08 17:44       ` Guillaume Yziquel
2010-02-08 17:57         ` Luca de Alfaro
2010-02-09  6:53         ` Basile STARYNKEVITCH
2010-02-08 17:54     ` Guillaume Yziquel
2010-02-09  0:25     ` Michael Ekstrand
2010-02-08 12:38 ` [Caml-list] " Guillaume Yziquel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox