From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by yquem.inria.fr (Postfix) with ESMTP id 5EC0DBBAF for ; Sun, 15 Nov 2009 16:22:41 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApMCAOir/0quhHTij2dsb2JhbACcGwEBAQEJCwgctUCEPASDBQ X-IronPort-AV: E=Sophos;i="4.44,746,1249250400"; d="scan'208";a="40137796" Received: from birch.site5.com ([174.132.116.226]) by mail1-smtp-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-SHA; 15 Nov 2009 16:22:40 +0100 Received: from pool-96-232-2-87.nycmny.east.verizon.net ([96.232.2.87] helo=[192.168.0.105]) by birch.site5.com with esmtp (Exim 4.69) (envelope-from ) id 1N9gw3-0001lb-33 for caml-list@yquem.inria.fr; Sun, 15 Nov 2009 09:22:39 -0600 Message-Id: <0F6FD913-974C-49E5-AC3E-AB5D7D357DF5@johnnowak.com> From: John Nowak To: caml-list@yquem.inria.fr In-Reply-To: <20091115145552.GA14456@localhost> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v936) Subject: Re: [Caml-list] calling OCaml from C on non-Mac platforms? Date: Sun, 15 Nov 2009 10:22:36 -0500 References: <20091115145552.GA14456@localhost> X-Mailer: Apple Mail (2.936) X-ACL-Warn: { X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - birch.site5.com X-AntiAbuse: Original Domain - yquem.inria.fr X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - johnnowak.com X-Source: X-Source-Args: X-Source-Dir: X-Spam: no; 0.00; ocaml:01 ocaml:01 ocamlopt:01 -output-obj:01 cmx:01 2009:98 wrote:01 wrote:01 caml-list:01 compiling:02 native:03 perhaps:05 problem:05 john:08 john:08 On Nov 15, 2009, at 9:55 AM, Eric Cooper wrote: > On Sun, Nov 15, 2009 at 08:27:49AM -0500, John Nowak wrote: > >> I'm trying to call OCaml from C. >> [...] >> ocamlopt -output-obj hello.cmx -o hello.o > > This is the main problem. You're clobbering the hello.o that OCaml > produced when compiling hello.ml into native code. Works well now, thanks. Perhaps the documentation could be amended to make this more clear. Although, in retrospect, I should've realized what was happening. - John