From: Christophe TROESTLER <Christophe.Troestler+ocaml@umh.ac.be>
To: benjamin.vadon@gmail.com
Cc: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] charger une DLL C dans programme ocaml
Date: Wed, 23 Apr 2008 08:56:59 +0200 (CEST) [thread overview]
Message-ID: <20080423.085659.111771972234913475.Christophe.Troestler+ocaml@umh.ac.be> (raw)
In-Reply-To: <1eb9f4cb0804221525p1dd69673h8883389f8372477c@mail.gmail.com>
On Wed, 23 Apr 2008 00:25:25 +0200, Benjamin Vadon wrote:
>
> Je dois créer un logiciel graphique (gtk) qui communique avec ce matériel,
> et ce faisant appel à la DLL, et j'aurai souhaité le développer en ocaml, au
> lieu de c++ comme prévu au départ, pour divers raisons.
Vous voudrez probablement lire le chapitre gtk de http://ocaml-tutorial.org/
> Le point qui me bloque donc pour me lancer dans le choix d'ocaml est de
> savoir comment intégrer les appels à la DLL.
Il faut écrire des stubs comme décrit dans le manuel :
http://caml.inria.fr/pub/docs/manual-ocaml/manual032.html
Pour la compilation, vous pouvez regarder le script
http://www.ocaml.info/ocaml_sources/pcre-ocaml-5.14.0/pcre_make.win32/make_pcre.ml
de PCRE-OCaml qui crée les lignes de commande nécessaires.
Ce tutorial peut éventuellement vous être utile :
http://www.linux-nantes.org/~fmonnier/OCaml/ocaml-wrapping-c.php
Bien sûr, vous pouvez aussi essayer la branche « natdynlink » :
http://alain.frisch.fr/natdynlink.html
Cordialement,
ChriS
next prev parent reply other threads:[~2008-04-23 6:57 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-22 22:25 Benjamin Vadon
2008-04-23 6:56 ` Christophe TROESTLER [this message]
2008-04-23 7:24 ` [Caml-list] " Benjamin Vadon
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=20080423.085659.111771972234913475.Christophe.Troestler+ocaml@umh.ac.be \
--to=christophe.troestler+ocaml@umh.ac.be \
--cc=benjamin.vadon@gmail.com \
--cc=caml-list@yquem.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