From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id 78F4F7F890 for ; Tue, 25 Mar 2014 22:38:03 +0100 (CET) Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of milanst@gmail.com) identity=pra; client-ip=209.85.223.172; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="milanst@gmail.com"; x-sender="milanst@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of milanst@gmail.com designates 209.85.223.172 as permitted sender) identity=mailfrom; client-ip=209.85.223.172; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="milanst@gmail.com"; x-sender="milanst@gmail.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-ie0-f172.google.com) identity=helo; client-ip=209.85.223.172; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="milanst@gmail.com"; x-sender="postmaster@mail-ie0-f172.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AsQBAAn2MVPRVd+slGdsb2JhbABZhBiDB79lgRUIFg4BAQEBBwsLCRIqgiUBAQEDASMEGQEbHQEDAQsGBQsPAiYCAiIBEQEFARwGh3cBAwkIoT6MDlGDDpZXChknDWSGNxEBBQyBHY1FB4JvgUkBA5hNkEMYKYR4IQ X-IPAS-Result: AsQBAAn2MVPRVd+slGdsb2JhbABZhBiDB79lgRUIFg4BAQEBBwsLCRIqgiUBAQEDASMEGQEbHQEDAQsGBQsPAiYCAiIBEQEFARwGh3cBAwkIoT6MDlGDDpZXChknDWSGNxEBBQyBHY1FB4JvgUkBA5hNkEMYKYR4IQ X-IronPort-AV: E=Sophos;i="4.97,730,1389740400"; d="scan'208";a="64727156" Received: from mail-ie0-f172.google.com ([209.85.223.172]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/RC4-SHA; 25 Mar 2014 22:38:02 +0100 Received: by mail-ie0-f172.google.com with SMTP id as1so1025942iec.17 for ; Tue, 25 Mar 2014 14:38:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=zeoVnJyqsyjAt9rqWK/M0fp6i2OESW8x9AuBov2ri4A=; b=qDWLF39uTznS4juA2a9Q47eXJ3lHCRV/s757dOCh7YUaIbkRrpE9dw1vskHj1QubED sjcVVda/OPVUGNA3JP3wpk1WRhXQ4/8my4Xg07sBoEi1UVMf2n7xP6qr9EecvHbprko4 bqTVBmBz2rSOr3AV4+Uee70B0hPaYWN/p4wvrj+SRwTBND3mP+f90GgbFjKSgV5Miq47 w2aCnbtd8QNEl7M3AU+7f8EtAj5DHyMtrXnqBo6rBwYhZ3CnaiY8krwc75KeowxZgsTX AfsdLzFp0j+ULrR4pYbE3cQ0K18gBuY3/GpEQktASr742P3B9K5MkQ2r7lP+qiWpQ/r/ +MDw== X-Received: by 10.50.176.162 with SMTP id cj2mr20360833igc.7.1395783481611; Tue, 25 Mar 2014 14:38:01 -0700 (PDT) MIME-Version: 1.0 Received: by 10.64.28.231 with HTTP; Tue, 25 Mar 2014 14:37:21 -0700 (PDT) In-Reply-To: References: From: =?UTF-8?Q?Milan_Stanojevi=C4=87?= Date: Tue, 25 Mar 2014 17:37:21 -0400 Message-ID: To: Jeremy Yallop Cc: Dan Benjamin , David Sheets , Bruno Deferrari , O Caml Content-Type: text/plain; charset=UTF-8 Subject: Re: [Caml-list] Static linking via Ctypes? > 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?