From mboxrd@z Thu Jan 1 00:00:00 1970 X-Sympa-To: caml-list@inria.fr Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id p8EGgreA029183 for ; Wed, 14 Sep 2011 18:42:53 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AsoBABjZcE5XYrOOmWdsb2JhbABBpWyCDwEBAQEBCAsLBxQmgVMBAQUyAQVAARALGAkWDwkDAgECAUUGDQEHAod1tUGGbgSYeYtt X-IronPort-AV: E=Sophos;i="4.68,381,1312149600"; d="scan'208";a="119835773" Received: from 17.mo1.mail-out.ovh.net (HELO mo1.mail-out.ovh.net) ([87.98.179.142]) by mail1-smtp-roc.national.inria.fr with ESMTP; 14 Sep 2011 18:42:47 +0200 Received: from mail174.ha.ovh.net (b6.ovh.net [213.186.33.56]) by mo1.mail-out.ovh.net (Postfix) with SMTP id 03641100028B for ; Wed, 14 Sep 2011 18:43:30 +0200 (CEST) Received: from b0.ovh.net (HELO queueout) (213.186.33.50) by b0.ovh.net with SMTP; 14 Sep 2011 18:42:47 +0200 Received: from unknown (HELO ?138.231.81.43?) (romain%bardou.fr@138.231.81.43) by ns0.ovh.net with SMTP; 14 Sep 2011 18:42:46 +0200 Message-ID: <4E70D958.4030601@lri.fr> Date: Wed, 14 Sep 2011 18:42:00 +0200 From: Romain Bardou User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.20) Gecko/20110820 Icedove/3.1.12 MIME-Version: 1.0 To: =?ISO-8859-1?Q?St=E9phane_Glondu?= CC: jeremie@dimino.org, OCaml List X-Ovh-Mailout: 178.32.228.1 (mo1.mail-out.ovh.net) References: <4E70C18F.3040304@lri.fr> <83695D27-A767-438A-B909-6864D1A655FE@googlemail.com> <4E70CEAE.8030807@lri.fr> <4E70D140.8030507@glondu.net> <4E70D26A.10801@lri.fr> <4E70D789.6030309@glondu.net> In-Reply-To: <4E70D789.6030309@glondu.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Ovh-Tracer-Id: 15674215553858136579 X-Ovh-Remote: 138.231.81.43 () X-Ovh-Local: 213.186.33.20 (ns0.ovh.net) X-Spam-Check: DONE|U 0.5/N X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -200 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrfeeftddrfeduucetggdotefuucfrrhhofhhilhgvmecuqfggjfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmneculddquddttddm X-Validation-by: bardou@lri.fr Subject: Re: [Caml-list] Link a .so/.dll dynamically Le 14/09/2011 18:34, Stéphane Glondu a écrit : > On 09/14/2011 06:12 PM, Romain Bardou wrote: >> Thanks, this solves the "native" part of my problem ! Now I need to >> figure out how to link this .so file. > > You mean, the equivalent of dllmylib.so? There is no such file in native > code: mylib.cmxs will contain the contents of mylib.cmxa and wrapper.o. > > > HTH, > No I mean the driver DLL for which Mylib is the binding. File dllmylib.so is linked correctly, but binding.c includes api.h, which is implemented in api.so, so I need to link with api.so as well. The whole point of my original question is: how can I design the program such that this api.so is loaded dynamically, because the user may want to choose a different driver everytime, or even change driver during execution. Cheers, -- Romain Bardou