Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
* Compiling pycaml shared library
@ 2006-02-03 19:20 Grant Monroe
  2006-02-04 14:35 ` [Caml-list] " Richard Jones
  2006-02-06 10:38 ` Vsevolod Fedorov
  0 siblings, 2 replies; 4+ messages in thread
From: Grant Monroe @ 2006-02-03 19:20 UTC (permalink / raw)
  To: caml-list

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.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-02-06 18:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-02-03 19:20 Compiling pycaml shared library Grant Monroe
2006-02-04 14:35 ` [Caml-list] " Richard Jones
2006-02-06 10:38 ` Vsevolod Fedorov
2006-02-06 18:10   ` Grant Monroe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox