Browse thread
[Caml-list] Interfacing C with Ocaml
- Julius
[
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: | Julius <flute@n...> |
| Subject: | [Caml-list] Interfacing C with Ocaml |
Hello, I'am using ocamlidl to build an interface from custom C header but I have some problems (sorry if they are trivial)... First, the following opaque structure definition doesn't pass the compilation stage (dereferencing pointer to incomplete type) : typedef struct foo toto; I thought this appens because C compiler doesn't know the size of foo structure. I tryed to define my own ml2c and c2ml functions (avoiding the problem by using pointers toto*) but I don't see how i can convert C pointer to Caml value... Second, I have to give an IDL description of this awful thing... typedef int (*foo_fun)(void*, int, char**, char**); ... and I really don't see how to do that. Is anyone can help me? Thanks a lot :) Julien Blond ------------------- 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