From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Delivered-To: caml-list@yquem.inria.fr Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id B00CBBCAB for ; Mon, 16 May 2005 20:31:43 +0200 (CEST) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j4GIVhv7025278 for ; Mon, 16 May 2005 20:31:43 +0200 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 UAA13301 for ; Mon, 16 May 2005 20:31:42 +0200 (MET DST) Received: from zproxy.gmail.com (zproxy.gmail.com [64.233.162.199]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j4GIVfMu025273 for ; Mon, 16 May 2005 20:31:42 +0200 Received: by zproxy.gmail.com with SMTP id 34so1375990nzf for ; Mon, 16 May 2005 11:31:41 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=SpQ9uJHzocCYkINcFilIoTNPohKIowl9AOqNP4MBho3qYvBXtet1lCN0Z9JRBPfCXzmA/4/kqmJ6Pueuc/yxNBS+fogWx3eDogpTSBB/j6XTU2xirZqInZDZ9V6www1d0s8fWQX5JTiO3o47PQuG7V55lD/NyC+VTuwngmROz28= Received: by 10.36.153.1 with SMTP id a1mr1795590nze; Mon, 16 May 2005 11:31:41 -0700 (PDT) Received: by 10.36.79.10 with HTTP; Mon, 16 May 2005 11:31:41 -0700 (PDT) Message-ID: Date: Mon, 16 May 2005 11:31:41 -0700 From: "Corey O'Connor" Reply-To: "Corey O'Connor" To: Ocaml Subject: Problems linking in an object file produced with "ocamlopt -c -output-obj" Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Miltered: at nez-perce with ID 4288E70F.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at nez-perce with ID 4288E70D.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; ocamlopt:01 -output-obj:01 o'caml:01 o'caml:01 compiler:01 ocamlopt:01 -output-obj:01 ocaml:01 libs:01 usr:01 cmxa:01 cmx:01 cmx:01 macos:01 macosx:01 X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on yquem.inria.fr X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_BY_IP autolearn=disabled version=3.0.2 X-Spam-Level: For some reason I'm trying to integrate O'Caml into XCode nicely. Add .ml[i] files to an XCode project and they'll get compiled and linked into a regular, native XCode target just like any other source file. Anyways... Since I can't make XCode use the O'Caml compiler as the linker, I am compiling all O'Caml files into a single object that then gets passed to the standard linker. I believe using "ocamlopt -c the_object.o -output-obj [my compiled ocaml files...]" then passing the_object.o, and the required O'Caml libs to the linker is the right idea. However, the linker is still complaining about some unresolved symbols. I've tried various combinations of libraries and link orders but I can't figure out where these symbols are: _caml_atom_table _caml_static_data_end _caml_static_data_start _caml_code_area_end _caml_code_area_start Here is the relevant section of the build log: Link command: /usr/local/bin/ocamlopt -o sources_ml.o -output-obj unix.cmxa OpenGL.cmx Test.cmx Ld "/Users/coconnor/Cocoa Caml Test/build/Cocoa Caml Test.app/Contents/MacOS/Cocoa Caml Test" normal ppc cd "/Users/coconnor/Cocoa Caml Test" setenv MACOSX_DEPLOYMENT_TARGET 10.3 /usr/bin/gcc-4.0 -o "/Users/coconnor/Cocoa Caml Test/build/Cocoa Caml Test.app/Contents/MacOS/Cocoa Caml Test" "-L/Users/coconnor/Cocoa Caml Test/build" -L/usr/local/lib/ocaml "-F/Users/coconnor/Cocoa Caml Test/build" -filelist "/Users/coconnor/Cocoa Caml Test/build/Cocoa Caml Test.build/Cocoa Caml Test.build/Objects-normal/ppc/Cocoa Caml Test.LinkFileList" -framework Cocoa -lcamlidl -lunix -lasmrun -framework OpenGL -lbigarray -lthreads -lnums -lstr -lcamlrun -lthreadsnat -arch ppc /usr/bin/ld: Undefined symbols: _caml_atom_table _caml_static_data_end _caml_static_data_start _caml_code_area_end _caml_code_area_start Any ideas? --=20 -Corey O'Connor