From: Grant Monroe <grant@janrain.com>
To: caml-list@yquem.inria.fr
Subject: Compiling pycaml shared library
Date: Fri, 3 Feb 2006 11:20:41 -0800 [thread overview]
Message-ID: <826ff8bf0602031120i355928e5r3e5b0bc4b644782b@mail.gmail.com> (raw)
Hello All,
I'm trying to figure out how to compile a simple shared library (.so)
using pycaml that I can load from the python interpreter. I have a
single .ml file who's contents are as follows:
open Pycaml
let foo_bar_print = pywrap_closure (fun x -> print_endline "hi" ; pynone ()) ;;
let sd = pyimport_getmoduledict () ;;
let mx = pymodule_new "CamlModule" ;;
let cd = pydict_new () ;;
let cx = pyclass_new (pynull (), cd, pystring_fromstring "CamlClass") ;;
let cmx = pymethod_new (foo_bar_print,(pynull ()),cx) ;;
let _ = pydict_setitemstring (cd, "CamlMethod", cmx) ;;
let _ = pydict_setitemstring (pymodule_getdict mx, "CamlClass", cx) ;;
let _ = pydict_setitemstring (sd, "CamlModule", mx) ;;
I'm new to ocaml so basically I want to know what commands to run with
which flags and what libraries need to be linked to and how. Any help
would be appreciated.
Grant Monroe
JanRain, Inc.
P.S. - I tried sending the project creator a message, but the email
address listed on the page seems to have expired.
next reply other threads:[~2006-02-03 19:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-02-03 19:20 Grant Monroe [this message]
2006-02-04 14:35 ` [Caml-list] " Richard Jones
2006-02-06 10:38 ` Vsevolod Fedorov
2006-02-06 18:10 ` Grant Monroe
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=826ff8bf0602031120i355928e5r3e5b0bc4b644782b@mail.gmail.com \
--to=grant@janrain.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