Browse thread
[Caml-list] Interface between Ocaml and C++
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| 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 <gnu04@yahoo.com> 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 http://www.swig.org/ -- Hey, Adam Smith, keep your invisible hands to yourself! ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners