From: John Whitington <john@coherentgraphics.co.uk>
To: David Scott <scott.dj@gmail.com>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] Simplifying link steps when making shared libraries containing OCaml (possibly OSX specific)
Date: Tue, 10 Nov 2015 18:20:00 +0000 [thread overview]
Message-ID: <56423550.5050000@coherentgraphics.co.uk> (raw)
In-Reply-To: <CAG_esB3RoRh5n35riX81UCGacLu-C1g9Y7zgLYmMckwJaZn9_g@mail.gmail.com>
Hi David,
David Scott wrote:
> Hi,
>
> I've packaged up some OCaml code with a C shim and made a shared library
> (a ".so" file) on OSX. It's all working fine! However the build steps
> I'm using are a bit verbose -- I wonder if anyone knows how to simplify
> them?
>
> I'm building all the objects and then using a custom linker invocation,
> see below. Notice that I'm tediously listing all the stubs for all my
> ocamlfind packages-- this seems like it could be simplified somehow.
No answers, I'm afraid, but if you do find a good generic way of doing
it for OS X (and indeed, Linux), it would be great have patches to this:
https://github.com/johnwhitington/ocaml-main-program-in-c
(which only does static binaries when run under Unix or OS X, but both
static binaries and dynamic libraries when under Windows.)
You can see that I didn't manage to find a way to automatically extract
which ocamlfind packs are needed, or indeed if unix or bigarray is
needed. They must be specified:
https://github.com/johnwhitington/ocaml-main-program-in-c/blob/master/build
Thanks,
John
--
John Whitington
Director, Coherent Graphics Ltd
http://www.coherentpdf.com/
prev parent reply other threads:[~2015-11-10 18:20 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-10 15:41 David Scott
2015-11-10 18:20 ` 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=56423550.5050000@coherentgraphics.co.uk \
--to=john@coherentgraphics.co.uk \
--cc=caml-list@inria.fr \
--cc=scott.dj@gmail.com \
/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