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=1.1 required=5.0 tests=AWL,SPF_NEUTRAL autolearn=disabled version=3.1.3 Received: from discorde.inria.fr (discorde.inria.fr [192.93.2.38]) by yquem.inria.fr (Postfix) with ESMTP id 7668BBC69 for ; Wed, 28 Mar 2007 17:49:31 +0200 (CEST) Received: from wr-out-0506.google.com (wr-out-0506.google.com [64.233.184.234]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id l2SFnUph028085 for ; Wed, 28 Mar 2007 17:49:30 +0200 Received: by wr-out-0506.google.com with SMTP id q50so2349918wrq for ; Wed, 28 Mar 2007 08:49:29 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=V0lJhgwDzl49HRHrf68YHMDHOTjrSHnuDzBB5I8ye+wjmhwNrd2Q4Gsid4M/fyYdhXdU3SqbB3qJElz5z6dkV8kmlIG3ccVMI20jbmoLGxG9icNeOVJxguMq4lU9SDZ4HfUdUFlETRtu0CJQuBHdIIYjW2rRzwGjJdYCdA7dhH8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=YGTZsvwMsDdNHEW2WQDMd2pWrA2Kla22yrDW6B7HRzeR8UemEoBmUNfayCFWbOmPP/A3ngE64Dq4D7SQ+pLRPc1IUPVcxxol8fXYOGR0lYkkdSIj+8eHBxpTWLFb961NaIsEbWMsTflMPUy6gNc4wRXAg2WBKsNUsQNDphXIvJM= Received: by 10.114.166.1 with SMTP id o1mr3784174wae.1175096968626; Wed, 28 Mar 2007 08:49:28 -0700 (PDT) Received: by 10.114.183.4 with HTTP; Wed, 28 Mar 2007 08:49:28 -0700 (PDT) Message-ID: Date: Wed, 28 Mar 2007 17:49:28 +0200 From: "Nicolas Pouillard" To: "Joel Reymont" Subject: Re: [Caml-list] Producing a C wrapper with ocamlbuild or OMake Cc: "Caml List" In-Reply-To: <2378477D-F40B-4A4D-B8A4-E0446FB46F7A@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <026CA3D4-5A8B-4083-B429-DE5AEC418C0A@gmail.com> <02DBCF0E-8CC6-44CC-B59D-31533A58C32A@gmail.com> <5FF6CDCC-AE05-472F-B721-782D32302EB7@gmail.com> <2378477D-F40B-4A4D-B8A4-E0446FB46F7A@gmail.com> X-j-chkmail-Score: MSGID : 460A8E8A.001 on discorde : j-chkmail score : X : 0/20 1 0.000 -> 1 X-Miltered: at discorde with ID 460A8E8A.001 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; ocaml:01 dependencies:01 ocaml:01 osx:01 gcc:01 foo:01 foo:01 usr:01 wrote:01 caml-list:01 undefined:01 grep:01 bin:01 data:02 data:02 On 3/28/07, Joel Reymont wrote: > One last question... Two, actually. > > How would I add another C file to the pipeline to produce the final > executable? Add it like a link flag. flag ["ocaml"; "link"; "output_obj"(* I think that's where you want it *)] (A"your_file.o"); Then add it to dependencies to force it's creation. dep ["ocaml"; "link"; "output_obj"(* I think that's where you want it *)] ["your_file.o"]; > Then, I tried using the library I built but I get an error. I have no > iea what's going on, does anyone? I'm on Mac OSX if it matters. > > gcc foo.c -L_build -lmorpher -o foo > /usr/bin/ld: Undefined symbols: > _caml_atom_table > _caml_code_area_end > _caml_code_area_start > _caml_static_data_end > _caml_static_data_start > collect2: ld returned 1 exit status > > nm _build/libmorpher.a |grep caml_atom_table > 00000400 C _caml_atom_table > U _caml_atom_table > No idea. -- Nicolas Pouillard