From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.1.3 Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id 6F6CCBC6B for ; Sun, 5 Aug 2007 01:56:45 +0200 (CEST) Received: from sys19.mail.msu.edu (sys19.mail.msu.edu [35.9.75.119]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id l74Nuhit006251 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Sun, 5 Aug 2007 01:56:45 +0200 Received: from [24.56.244.4] (helo=[192.168.1.254]) by sys19.mail.msu.edu with esmtpsa (Exim 4.63 #1) (TLSv1:AES256-SHA:256) id 1IHTUA-0007XA-P4 for caml-list@inria.fr; Sat, 04 Aug 2007 19:56:42 -0400 Message-ID: <46B5123A.9020702@msu.edu> Date: Sat, 04 Aug 2007 19:56:42 -0400 From: Jeff Shaw User-Agent: Thunderbird 2.0.0.5 (Windows/20070716) MIME-Version: 1.0 To: caml-list@inria.fr Subject: three different labltk behaviors Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus: None found by Clam AV X-j-chkmail-Score: MSGID : 46B5123B.000 on concorde : j-chkmail score : X : 0/20 1 0.000 -> 1 X-Miltered: at concorde with ID 46B5123B.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; labltk:01 ocaml:01 ocaml:01 labltk:01 wikipedia:01 wiki:01 bytecode:01 tkerror:01 toplevel:01 toplevel:01 mingw:01 cmo:01 ocamlc:01 cmo:01 bytecode:01 Ocaml community, For fun I wrote a version of Life for ocaml +labltk. http://en.wikipedia.org/wiki/Conway%27s_Game_of_Life Here are the 3 ways I've tried to run it and the results: 1. compile to bytecode or native: "Fatal error: exception Protocol.TkError("Tcl/Tk not initialised")" 2. #load all the libraries into the toplevel (or give them as command line arguments) then #use "lifemain.ml": works 3. Run the toplevel with "lifemain.ml" as an argument: gives an empty Tk window The results are the same on Mac OS X and Windows XP (mingw). Here's the toplevel command: ocaml -I +labltk -I +threads unix.cma labltk.cma threads.cma tkthread.cmo life.cma lifeui.cma lifemain.ml or leave off "lifemain.ml" and do a #use "lifemain.ml". to compile: ocamlc -I +labltk -I +threads -o life unix.cma labltk.cma threads.cma tkthread.cmo life.cma lifeui.cma lifemain.ml The sources are at http://www.msu.edu/~shawjef3/life/life.ml http://www.msu.edu/~shawjef3/life/lifeui.ml http://www.msu.edu/~shawjef3/life/lifemain.ml Any ideas about how to get a bytecode or native compiled version working? Thanks, Jeff