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 WAA18749; Fri, 6 Feb 2004 22:00:27 +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 WAA19569 for ; Fri, 6 Feb 2004 22:00:25 +0100 (MET) Received: from mail-dark.research.att.com (mail-dark.research.att.com [192.20.225.112]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id i16L0Pv08982 for ; Fri, 6 Feb 2004 22:00:25 +0100 (MET) Received: from mail-blue.research.att.com (mail-blue.research.att.com [135.207.30.102]) by mail-dark.research.att.com (Postfix) with ESMTP id 21B65E813A; Fri, 6 Feb 2004 16:01:23 -0500 (EST) Received: from bigmail.research.att.com (bigmail.research.att.com [135.207.30.101]) by mail-blue.research.att.com (Postfix) with ESMTP id CCD01F3B09; Fri, 6 Feb 2004 15:55:05 -0500 (EST) Received: from research.att.com (alanine.research.att.com [135.207.24.225]) by bigmail.research.att.com (8.11.6+Sun/8.11.6) with ESMTP id i16L0MZ25403; Fri, 6 Feb 2004 16:00:22 -0500 (EST) Date: Fri, 6 Feb 2004 16:00:37 -0500 Subject: [Caml-list] Re: Aqua ocamlbrowser on Mac OS X Content-Type: text/plain; charset=US-ASCII; format=flowed Mime-Version: 1.0 (Apple Message framework v553) Cc: caml-list@inria.fr To: Shivkumar Chandrasekaran From: Trevor Jim In-Reply-To: <42856FC8-58D8-11D8-A224-003065BDAA76@ece.ucsb.edu> Message-Id: <83808503-58E7-11D8-B5B7-00039393D0CC@research.att.com> Content-Transfer-Encoding: 7bit X-Mailer: Apple Mail (2.553) X-Loop: caml-list@inria.fr X-Spam: no; 0.00; unison:01 command-line:01 xxxxxxxx:99 carbon:99 argc:01 argv:01 argv:01 shivkumar:01 otherlibs:01 labltk:01 ocaml:01 caml:01 caml:01 null:01 command:98 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk I debugged the following when getting a version of Unison running in Aqua: /* When you click-start or use the open command, the program is invoked with a command-line arg of the form -psn_XXXXXXXXX. The XXXXXXXX is a "process serial number" and it seems to be important for Carbon programs. We need to get rid of it if it's there so the ocaml code won't exit. Note, the extra arg is not added if the binary is invoked directly from the command line without using the open command. */ if (argc == 2 && strncmp(argv[1],"-psn_",5) == 0) { argc--; argv[1] = NULL; } I just put that in main before calling caml. (I am calling caml from ObjC.) -Trevor On Friday, February 6, 2004, at 02:11 PM, Shivkumar Chandrasekaran wrote: > did not work if I double-clicked on Ocamlbroswer.app. I then tried > from the command line > > open -a Ocamlbrowser > > That at least let ocamlbrowser display its error message that the > options to the command line were at fault. All the Console showed in > the log was a dreaded "RegisterProcess failed (error -50)" message. > > So I edited the source file ..../otherlibs/labltk/browser/main.ml and > essentially commented out the command line argument parsing step. I > did "make" and moved the new binary into > OCamlbrowser.app/Contents/MacOS/ and everything works pretty nicely > now. ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners