caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "Christoph Höger" <christoph.hoeger@tu-berlin.de>
To: caml users <caml-list@inria.fr>
Subject: [Caml-list] ctypes and oasis
Date: Wed, 7 Sep 2016 10:58:05 +0200	[thread overview]
Message-ID: <6607ba43-1e6f-184d-5c04-5565bdd8604d@tu-berlin.de> (raw)

Dear all,

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:

Dl.DL_error("./main.native: undefined symbol: some_bar")

This is to be expected, as there is no dynamic library for bar.

So how do I solve this?

Is there some way to tell oasis to build a shared library from the
csources (and link it to all depending artifacts)?

thanks,

Christoph
-- 
Christoph Höger

Technische Universität Berlin
Fakultät IV - Elektrotechnik und Informatik
Übersetzerbau und Programmiersprachen

Sekr. TEL12-2, Ernst-Reuter-Platz 7, 10587 Berlin

Tel.: +49 (30) 314-24890
E-Mail: christoph.hoeger@tu-berlin.de

             reply	other threads:[~2016-09-07  8:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-07  8:58 Christoph Höger [this message]
2016-09-07 11:12 ` Jeremy Yallop

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=6607ba43-1e6f-184d-5c04-5565bdd8604d@tu-berlin.de \
    --to=christoph.hoeger@tu-berlin.de \
    --cc=caml-list@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).