caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: John Whitington <john@coherentgraphics.co.uk>
To: caml-list@yquem.inria.fr
Subject: Re: Building with OCamlMkLib
Date: Thu, 22 Jan 2009 15:21:20 +0000	[thread overview]
Message-ID: <04CCDF06-0F4F-4F82-9F87-9DD9BD9017C6@coherentgraphics.co.uk> (raw)
In-Reply-To: <B6E31133-DB91-4453-BC16-70A3840E8E7A@coherentgraphics.co.uk>

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/


      parent reply	other threads:[~2009-01-22 15:21 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-20 17:03 John Whitington
2009-01-20 17:22 ` [Caml-list] " Alain Frisch
2009-01-20 21:35 ` Matthieu Dubuget
2009-01-21 14:43 ` Stefano Zacchiroli
2009-01-22 15:21 ` John Whitington [this message]

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=04CCDF06-0F4F-4F82-9F87-9DD9BD9017C6@coherentgraphics.co.uk \
    --to=john@coherentgraphics.co.uk \
    --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;
as well as URLs for NNTP newsgroup(s).