Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] Interface between Ocaml and C++
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2004-06-19 (07:27)
From: art yerkes <ayerkes@s...>
Subject: Re: [Caml-list] Interface between Ocaml and C++
On Fri, 18 Jun 2004 21:56:05 -0700 (PDT)
Gu Nu <> wrote:

> Hi, all
> Does anybody know how to deal with C++ classes, such
> as vectors, maps, in Ocaml? It seems that currently
> Ocaml can  only support the interoperation of C. So
> the first step is to try encapusuate a C++ class with
> C interface, then write C interface for Ocaml.
> However, it is so inconvient for std classes. Does
> anybody has any better ideas?
> Thanks a lot!
> Andy

The SWIG module for Ocaml has support for a few STL
types.  If you use those interfaces as a guide, you
could add support for more if the automatic wrapping
doesn't suit.

SWIG isn't perfect for everyone but some needs are
met very well, including using templates.

Look at
Hey, Adam Smith, keep your invisible hands to yourself!

To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: