From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id p1NELdrD002094 for ; Wed, 23 Feb 2011 15:21:42 +0100 X-IronPort-AV: E=Sophos;i="4.62,212,1297033200"; d="scan'208";a="88532412" Received: from top.inrialpes.fr ([194.199.25.106]) by mail4-relais-sop.national.inria.fr with ESMTP/TLS/AES128-SHA; 23 Feb 2011 15:21:42 +0100 Mime-Version: 1.0 (Apple Message framework v1082) Content-Type: text/plain; charset=iso-8859-1 From: Alan Schmitt In-Reply-To: Date: Wed, 23 Feb 2011 15:21:41 +0100 Cc: "'caml-list@inria.fr'" Message-Id: <6E137EA1-CD63-43E8-B647-911AB57B7090@polytechnique.org> References: <2E007446-C7AD-46D6-8F9C-1377533EF156@polytechnique.org> To: David Allsopp X-Mailer: Apple Mail (2.1082) Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by walapai.inria.fr id p1NELdrD002094 Subject: Re: [Caml-list] Specifying a framework to link with using ocamlopt? On 23 févr. 2011, at 14:59, David Allsopp wrote: > Not necessarily - even if "-framework OpenGL" is working then the linker must still obey "-lGL" (it can't simply ignore it). Try including -verbose in your ocamlopt switches - this will display the calls to all external programs and you'll be able to verify that "-framework OpenGL" is indeed being passed to the linker (it should be, though). The "-verbose" option is very interesting indeed! It tells me the "-framework OpenGL" and "-framework GLUT" specified in the ocamlmklib are indeed taken into account. But for some reason, there are extra (spurious) -lGL, -lGlut, and -lGlu. These libraries are generated this way: ocamlmklib -o GL GL.cmx -framework OpenGL -lgl_stubs ocamlmklib -o Glu Glu.cmx -framework OpenGL ocamlmklib -o Glut Glut.cmx -framework GLUT which do not contain such linking primitives. Could this be related to this warning: ld: warning: -read_only_relocs cannot be used with x86_64 ? Thanks, Alan