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 mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by sympa.inria.fr (Postfix) with ESMTPS id CF8187EE42 for ; Fri, 14 Jun 2013 11:30:15 +0200 (CEST) Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of omeragacan@gmail.com) identity=pra; client-ip=74.125.82.173; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="omeragacan@gmail.com"; x-sender="omeragacan@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of omeragacan@gmail.com designates 74.125.82.173 as permitted sender) identity=mailfrom; client-ip=74.125.82.173; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="omeragacan@gmail.com"; x-sender="omeragacan@gmail.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-we0-f173.google.com) identity=helo; client-ip=74.125.82.173; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="omeragacan@gmail.com"; x-sender="postmaster@mail-we0-f173.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AigDALnhulFKfVKtjWdsb2JhbABagzlJr3WPZAgWDgEBAQEHCwsJEgYkgmoBGx4DEhBdAREBBQGIMAEDD5oNgn6MS4J/hFIKGScNWId0AQUMj1mDSgOJGo4ngSmONBYphDg5 X-IPAS-Result: AigDALnhulFKfVKtjWdsb2JhbABagzlJr3WPZAgWDgEBAQEHCwsJEgYkgmoBGx4DEhBdAREBBQGIMAEDD5oNgn6MS4J/hFIKGScNWId0AQUMj1mDSgOJGo4ngSmONBYphDg5 X-IronPort-AV: E=Sophos;i="4.87,864,1363129200"; d="scan'208";a="17795548" Received: from mail-we0-f173.google.com ([74.125.82.173]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/RC4-SHA; 14 Jun 2013 11:30:15 +0200 Received: by mail-we0-f173.google.com with SMTP id x54so281062wes.18 for ; Fri, 14 Jun 2013 02:30:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=T3DIYZN0uebkI103e2320PpuVeTQfHrrEb5V+69/N/k=; b=vOq9FlevNcAVu9OeEJuSpeeCOQFA/xXCDy5XvloUtGXTGz4TsMMOjo35uCM7GPILuh Ybnxg8J7Cgj0WEPKa6FLGtjvtbWKbKJ/YKS0NEpN3wTHbBWr5r6rm+4l/6RfOkTV0kJ8 HFfmH+Nl2X3MscMz0Tha7mkRJrIMCYiWfL4ptsfBk8DgoncDncvKuaAfBka8pKQoec1E c9gGx7v/xUQXph1FAYZU9pwVSHzoHHpasbrFX5aGJlcdAbFVDhPq3K87qkkkQMLiCTkt 7qGw6tulPz9eHNEtRGXqMuZOELLq1tjTlWZtwPUWeks4NC1ToqNVEWQsJ93OC6KLj0cL w+NQ== MIME-Version: 1.0 X-Received: by 10.194.242.229 with SMTP id wt5mr841089wjc.36.1371202215252; Fri, 14 Jun 2013 02:30:15 -0700 (PDT) Received: by 10.216.172.72 with HTTP; Fri, 14 Jun 2013 02:30:15 -0700 (PDT) Date: Fri, 14 Jun 2013 12:30:15 +0300 Message-ID: From: =?ISO-8859-9?Q?=D6mer_Sinan_A=F0acan?= To: caml-list@inria.fr Content-Type: text/plain; charset=ISO-8859-9 Content-Transfer-Encoding: quoted-printable Subject: [Caml-list] OCaml binary formats -- how are they linked? Hi all, Let's say I have a C API called from OCaml. Bindings are compiled to .cma, .cmx, .cmxa files. What I'm wondering is that are those C objects linked to those binary files statically or dynamically? Basically what I want to do is to link two different versions of those C objects(but they share same API, only difference is some assertions and debug info is enabled in one version but disabled in other) with minimal effort. If I want to enable debug info, I link one version of compiled C object files, and if I want to operate faster I link other version. Now if those C objects are linked to .cma, .cmx, .cmxa, etc. files statically, I think I have to compile those OCaml files with this different versions of C objects, is that correct? My guess is that those C objects are linked statically, because to compile my program with this library, I only needed to point to compiler .cma files. I'm not passing any parameters to show C object files' location. I still wanted to be 100% sure about that. And if those C objects are linked statically, is there a parameter or something to force them to be linked dynamically? Thanks, --- =D6mer Sinan A=F0acan http://osa1.net