From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id KAA30943 for caml-red; Tue, 21 Nov 2000 10:16:20 +0100 (MET) 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 WAA27358 for ; Mon, 20 Nov 2000 22:05:23 +0100 (MET) Received: from cs.clemson.edu (citron.cs.clemson.edu [130.127.48.6]) by nez-perce.inria.fr (8.11.1/8.10.0) with ESMTP id eAKL5Mf08892 for ; Mon, 20 Nov 2000 22:05:22 +0100 (MET) Received: from merlin.cs.clemson.edu (merlin [130.127.48.80]) by cs.clemson.edu (8.9.3/8.9.3) with ESMTP id QAA28852 for ; Mon, 20 Nov 2000 16:05:27 -0500 (EST) Received: (from steve@localhost) by merlin.cs.clemson.edu (8.9.3/8.9.3) id QAA03203; Mon, 20 Nov 2000 16:05:21 -0500 (EST) From: Steve Stevenson MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Mon, 20 Nov 2000 16:05:20 -0500 (EST) To: caml-list@inria.fr Subject: Missing something in getting C and Ocaml to Work Together X-Mailer: VM 6.43 under 20.4 "Emerald" XEmacs Lucid Message-ID: <14873.37069.529974.959686@merlin.cs.clemson.edu> Sender: weis@pauillac.inria.fr Good Afternoon, I have a very simple application. I have the main in ocaml and the rest of the system in C. I'm just trying something very straight forward. external cmainarg : int -> string array -> unit = "cmainarg" external io_infile_stdin : unit -> unit = "io_infile_stdin" external cmaininit : unit -> unit = "cmaininit" let main() = cmainarg (Array.length Sys.argv) Sys.argv; io_infile_stdin (); cmaininit(); 0 (*end*) And I use this to compile ocamlc main.cmo -custom -cclib csrc/libmainc.a When I do, I get no errors but ocamlrun a.out produces Fatal error: this bytecode file cannot run on this bytecode interpreter Mismatch on primitive `cmainarg' What am I doing wrong? Thanks. (NO, I don't know who will be president yet. :-) steve