From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from weis@localhost) by pauillac.inria.fr (8.6.10/8.6.6) id TAA12328 for caml-redistribution; Tue, 22 Oct 1996 19:05:57 +0200 Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.6.10/8.6.6) with ESMTP id RAA10193 for ; Tue, 22 Oct 1996 17:57:52 +0200 Received: from mail.gmd.de (mail.gmd.de [129.26.8.90]) by nez-perce.inria.fr (8.7.6/8.7.1) with SMTP id RAA07256 for ; Tue, 22 Oct 1996 17:57:44 +0200 (MET DST) Received: from [129.26.10.139] (k17mac20.gmd.de) by mail.gmd.de with SMTP id AA16870 (5.67b8/IDA-1.5 for ); Tue, 22 Oct 1996 17:57:40 +0200 Date: Tue, 22 Oct 1996 17:57:40 +0200 X-Sender: lhol@mail.gmd.de Message-Id: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" To: caml-list@inria.fr From: Leszek.Holenderski@gmd.de (Leszek Holenderski) Subject: Re: Shared libraries from caml Sender: weis >> Is there any way to produce a sunos and/or solaris shared library from a >> caml module? Preferably in Caml Special Light, but Objective Caml will also >> do. >> In fact, I'm interested in a more specific problem. Could I use csl or >> ocaml to produce input for the Tcl "load" command? Has anybody tried it >> yet? [Xavier Leroy wrote: >Dynamic linking of O'Caml modules inside an arbitrary program (e.g. tcl) >is even harder... ] Bad news, but this is what I've expected. Anyway, thanks for your answer. [Xavier Leroy wrote: >It would be much easier to link Tcl into an O'Caml program that has >already all O'Caml modules statically linked. The callback Tcl -> O'Caml >is not too hard to do, see CamlTk4 for an example. ] It doesn't help. The whole problem is to call O'Caml code from *standard* Tk wish, and not the *extended* one. My real problem is as follows. I've written some Tk application which uses O'Caml code to speed things up. The Caml-Tk combination I use is based on the same protocol as CamlTk4. As a consequence, my Tk application needs to be interpreted by an extended Tk wish (the one which contains my Caml code). Unfortunately, this means that in order to distribute my application I would have to distribute the extended wish as well. Anyone who has tried to distribute such an extended Tk wish in binary form knows that it's virtually impossible, due to "unprecedented flexibility" (read "unpredictable and messy configurations") of Unix. The extended wish must be recreated by a user of my program and this step needs at least Caml's linker, and in the worst case, the whole Caml environment. Thus, installing my application on another site becomes a serious problem for a casual user, even with the wonderful, almost fully automatic, installation scripts for O'Caml. If I could prepare my Caml code as a shared library then standard Tk wish could load it dynamically and I'd only need to distribute the library, not forcing the user to install the whole Caml environment just to play with my app. Cheers, Leszek