caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "Milan Stanojević" <milanst@gmail.com>
To: Jeremy Yallop <yallop@gmail.com>
Cc: Dan Benjamin <dbenjamin@janestreet.com>,
	David Sheets <sheets@alum.mit.edu>,
	 Bruno Deferrari <utizoc@gmail.com>, O Caml <caml-list@inria.fr>
Subject: Re: [Caml-list] Static linking via Ctypes?
Date: Tue, 25 Mar 2014 17:37:21 -0400	[thread overview]
Message-ID: <CAKR7PS-he-gbZZYB+h-BSz5iUMoeeKcGsj4wX_G0+r4ZRzH6Yg@mail.gmail.com> (raw)
In-Reply-To: <CAAxsn=GfRQe1Xph32HVQxZUNu-8KH3YtV9jOZBjguU8-43Up_w@mail.gmail.com>

> Not exactly, since the stub generation support in the next ctypes
> release resolves these issues in a different way.  In the current
> release (0.2.3) setting up foreign calls and linking are both entirely
> dynamic.  Stub generation will make it possible to link statically as
> well.

Can you tell us how would this work exactly?
Let's say I have a function "foo" in my C file (that I want to link
statically) and I want to give use it in ocaml with a ctype (void @->
returning int)
What would I need to say in my ocaml program and do I have to tell
anything to my build system?

  reply	other threads:[~2014-03-25 21:38 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-25 14:54 dbenjamin
2014-03-25 15:04 ` Bruno Deferrari
2014-03-25 15:11   ` Dan Benjamin
2014-03-25 15:24     ` David Sheets
2014-03-25 17:55       ` Dan Benjamin
2014-03-25 21:19         ` Jeremy Yallop
2014-03-25 21:37           ` Milan Stanojević [this message]
2014-03-25 23:14             ` Jeremy Yallop
2014-03-26 16:24               ` Travis Brady
2014-03-26 17:17                 ` Daniel Bünzli
2014-03-26 17:25               ` Milan Stanojević
2014-03-25 15:10 ` Daniel Bünzli

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=CAKR7PS-he-gbZZYB+h-BSz5iUMoeeKcGsj4wX_G0+r4ZRzH6Yg@mail.gmail.com \
    --to=milanst@gmail.com \
    --cc=caml-list@inria.fr \
    --cc=dbenjamin@janestreet.com \
    --cc=sheets@alum.mit.edu \
    --cc=utizoc@gmail.com \
    --cc=yallop@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;
as well as URLs for NNTP newsgroup(s).