Browse thread
Building with OCamlMkLib
-
John Whitington
- Alain Frisch
- Matthieu Dubuget
- Stefano Zacchiroli
- John Whitington
[
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: | 2009-01-22 (15:21) |
From: | John Whitington <john@c...> |
Subject: | Re: Building with OCamlMkLib |
Hi. On 20 Jan 2009, at 17:03, John Whitington wrote: > I'm building a Plain C interface to our PDF libraries, but am stuck. > The idea is to build a library with Ocamlmklib containing the C > wrapper around the ocaml code. Thanks to those who helped me here - I finally settled on a modified version of what's given in 18.8 in the manual. Here are the new files: http://www.coherentpdf.com/solution.tar.bz2 And here's what we ended up with... ocamlc cpdflibc.mli ocamlopt cpdflibc.ml ocamlc cpdflibwrapper.c ocamlopt -output-obj -o cpdflibc.o cpdflibc.cmx cp /usr/local/lib/ocaml/libasmrun.a cpdflib.a ar r cpdflib.a cpdflibc.o cpdflibwrapper.o ...producing the final cpdflib.a with which we can do... cc -o test test.c cpdflib.a ...to use the library. With Thanks, -- John Whitington Coherent Graphics Ltd http://www.coherentpdf.com/