From: Julius <flute@noos.fr>
To: caml-list@inria.fr
Subject: [Caml-list] Interfacing C with Ocaml
Date: Thu, 15 Jul 2004 15:31:22 +0200 [thread overview]
Message-ID: <200407151531.22817.flute@noos.fr> (raw)
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
next reply other threads:[~2004-07-15 13:31 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-07-15 13:31 Julius [this message]
-- strict thread matches above, loose matches on Subject: below --
2002-07-04 17:21 [Caml-list] interfacing C++ with OCaml Thierry SALSET
2002-07-05 9:46 ` Xavier Leroy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200407151531.22817.flute@noos.fr \
--to=flute@noos.fr \
--cc=caml-list@inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox