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 p1NEQtEk002457 for ; Wed, 23 Feb 2011 15:26:55 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AjwCAAOoZE1RZ90wkWdsb2JhbACmGRUBAQEBCQsKBxEDIYg5tAiDEBwCgjAEjBY X-IronPort-AV: E=Sophos;i="4.62,212,1297033200"; d="scan'208";a="88532724" Received: from mtaout02-winn.ispmail.ntl.com ([81.103.221.48]) by mail4-smtp-sop.national.inria.fr with ESMTP; 23 Feb 2011 15:26:50 +0100 Received: from aamtaout02-winn.ispmail.ntl.com ([81.103.221.35]) by mtaout02-winn.ispmail.ntl.com (InterMail vM.7.08.04.00 201-2186-134-20080326) with ESMTP id <20110223142634.OASC19887.mtaout02-winn.ispmail.ntl.com@aamtaout02-winn.ispmail.ntl.com>; Wed, 23 Feb 2011 14:26:34 +0000 Received: from romulus.metastack.com ([81.102.132.77]) by aamtaout02-winn.ispmail.ntl.com (InterMail vG.3.00.04.00 201-2196-133-20080908) with ESMTP id <20110223142634.NADM25842.aamtaout02-winn.ispmail.ntl.com@romulus.metastack.com>; Wed, 23 Feb 2011 14:26:34 +0000 Received: from remus.metastack.local ([172.16.0.1]) by romulus.metastack.com (8.14.2/8.14.2) with ESMTP id p1NEQVCY014129 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=FAIL); Wed, 23 Feb 2011 14:26:31 GMT Received: from Remus.metastack.local ([fe80::547c:3c42:e1da:eda2]) by Remus.metastack.local ([fe80::547c:3c42:e1da:eda2%11]) with mapi; Wed, 23 Feb 2011 14:21:50 +0000 From: David Allsopp To: "'Alan Schmitt'" CC: "'caml-list@inria.fr'" Thread-Topic: [Caml-list] Specifying a framework to link with using ocamlopt? Thread-Index: AQHL01qCYpWJmFu99k29At0YXZiK7ZQPHCUwgAAHIID///78MA== Date: Wed, 23 Feb 2011 14:19:33 +0000 Message-ID: References: <2E007446-C7AD-46D6-8F9C-1377533EF156@polytechnique.org> <6E137EA1-CD63-43E8-B647-911AB57B7090@polytechnique.org> In-Reply-To: <6E137EA1-CD63-43E8-B647-911AB57B7090@polytechnique.org> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: Content-Type: text/plain; charset="iso-8859-1" MIME-Version: 1.0 Organization: MetaStack Solutions Ltd. X-Scanned-By: MIMEDefang 2.65 on 81.102.132.77 X-Cloudmark-Analysis: v=1.1 cv=JvdXmxIgLJv2/GthKqHpGJEEHukvLcvELVXUanXFreg= c=1 sm=0 a=cdUUi1lex48A:10 a=8nJEP1OIZ-IA:10 a=xqWC_Br6kY4A:10 a=ZOzjf2MOAAAA:8 a=CedfB3kIArrB02BjXYIA:9 a=Lu3JUeY6GelcU6QY3MmqN3jnFAAA:4 a=wPNLvfGTeEIA:10 a=H1paHlvfXV0A:10 a=HpAAvcLHHh0Zw7uRqdWCyQ==:117 Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by walapai.inria.fr id p1NEQtEk002457 Subject: RE: [Caml-list] Specifying a framework to link with using ocamlopt? Alan Schmitt wrote: > 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 certainly is an invaluable platform debugging aid! ocamlmklib also supports it - perhaps using it with the command which generates the library may help further? > 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. Could this arise from -lgl_stubs? > 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 ? http://caml.inria.fr/mantis/view.php?id=4863 (see the notes, not the bug report) David