caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Jeremy Yallop <yallop@gmail.com>
To: "Christoph Höger" <christoph.hoeger@tu-berlin.de>
Cc: caml users <caml-list@inria.fr>
Subject: Re: [Caml-list] ctypes and oasis
Date: Wed, 7 Sep 2016 12:12:32 +0100	[thread overview]
Message-ID: <CAAxsn=HhUXq4GyxPqHGVQDjXzcKWMDmxsh4k7gRGB+ntHs0r2w@mail.gmail.com> (raw)
In-Reply-To: <6607ba43-1e6f-184d-5c04-5565bdd8604d@tu-berlin.de>

Dear Christoph,

On 7 September 2016 at 09:58, Christoph Höger
<christoph.hoeger@tu-berlin.de> wrote:
> I attempt to compile an oasis project structured like this:
>
> library Bar
>   Modules: Wrapper
>   CSources: bar.c
>   BuildDepends:     ctypes.foreign
>   CCLib:            -lfoo
>
>
> Essentially, bar is both an extension of foo and a binding of this
> extension for OCaml (using ctypes).
>
> The "extension" point is problematic. While I can build this lib just
> fine, the ctype bindings to the extension methods in bar.c are not found
> at runtime using Dl:

The easiest approach is to build a shared library libbar.so from bar.c
using the C toolchain and then to link that library in to the Bar
OCaml library using -lbar.

Kind regards,

Jeremy.

      reply	other threads:[~2016-09-07 11:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-07  8:58 Christoph Höger
2016-09-07 11:12 ` Jeremy Yallop [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='CAAxsn=HhUXq4GyxPqHGVQDjXzcKWMDmxsh4k7gRGB+ntHs0r2w@mail.gmail.com' \
    --to=yallop@gmail.com \
    --cc=caml-list@inria.fr \
    --cc=christoph.hoeger@tu-berlin.de \
    /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).