From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id WAA22227; Sun, 11 Nov 2001 22:24:08 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id WAA22873 for ; Sun, 11 Nov 2001 22:24:07 +0100 (MET) Received: from wg.pu.ru (wg.pu.ru [193.124.85.219]) by nez-perce.inria.fr (8.11.1/8.10.0) with ESMTP id fABLO6514744 for ; Sun, 11 Nov 2001 22:24:06 +0100 (MET) Received: from localhost.localdomain (p74.ppp.pu.ru [194.85.123.74]) by wg.pu.ru (8.9.1a/8.9.1) with ESMTP id VAA16191 for ; Sun, 11 Nov 2001 21:24:00 GMT Received: by localhost.localdomain (Postfix, from userid 501) id B59D2221D; Mon, 12 Nov 2001 00:21:46 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by localhost.localdomain (Postfix) with ESMTP id 770512161 for ; Mon, 12 Nov 2001 00:21:46 -0500 (EST) Date: Mon, 12 Nov 2001 00:21:46 -0500 (EST) From: Dimitri Timofeev X-Sender: To: OCaml mailing list Subject: [Caml-list] Dynamic module loading Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Greetings! Thanks to all for your help! Your answers were very useful for me. There is another question at the same subject. Can i use LablTk in dynamically loaded module? I've tried and i've encountered a problem. I take some code (i.e. eyes.ml) using LablTk. I write an example that should be able to load modules: let main () = try Dynlink.init (); Dynlink.add_interfaces ["Pervasives"; "Printexc"; "Tk"; "Frame"] [Sys.getcwd (); "/usr/lib/ocaml"; "/usr/lib/ocaml/labltk"]; Dynlink.loadfile Sys.argv.(1) with | Dynlink.Error e -> print_string "Dynamic linking error: "; print_string (Dynlink.error_message e); print_newline () ;; let _ = main () ;; I compile main.ml with command line "ocamlc -o main dynlink.cma main.ml" and eyes.ml with "ocamlc -c -I +labltk eyes.ml". Then i try to call it: "./main eyes.cmo", and i get Dynlink.Error exception saying that there is no implementation available for Support. But if i try to add "Support" into modules list, i get exception Not_found. It seems right, because i have no "support.cmi" file. Do i have some mistakes in my code or command lines, or i'm going a wrong way? Thanks again for your help. I'm very glad to be on this list. Dimitri ------------------- Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr