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 p1NDB2Pm015727 for ; Wed, 23 Feb 2011 14:11:02 +0100 X-IronPort-AV: E=Sophos;i="4.62,212,1297033200"; d="scan'208";a="88526752" Received: from top.inrialpes.fr ([194.199.25.106]) by mail4-relais-sop.national.inria.fr with ESMTP/TLS/AES128-SHA; 23 Feb 2011 14:10:57 +0100 From: Alan Schmitt Content-Type: text/plain; charset=us-ascii Date: Wed, 23 Feb 2011 14:10:57 +0100 Message-Id: <2E007446-C7AD-46D6-8F9C-1377533EF156@polytechnique.org> To: caml-list@inria.fr Mime-Version: 1.0 (Apple Message framework v1082) X-Mailer: Apple Mail (2.1082) Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by walapai.inria.fr id p1NDB2Pm015727 Subject: [Caml-list] Specifying a framework to link with using ocamlopt? Hello, I'm trying to compile a simple program using glMLite, and I cannot seem to find a way to tell ocamlopt to use the OS X framework I specify. If I don't say anything, I get (an expected) error: [:)][top] % ocamlopt -I +glMLite GL.cmxa Glut.cmxa triangle.ml -o triangle.exe ld: library not found for -lGL collect2: ld returned 1 exit status File "caml_startup", line 1, characters 0-1: Error: Error during linking If I try to tell the linker where the library is, I still get the same error: [:(][top] % ocamlopt -cclib "-framework OpenGL" -I +glMLite GL.cmxa Glut.cmxa triangle.ml -o triangle.exe ld: library not found for -lGL collect2: ld returned 1 exit status File "caml_startup", line 1, characters 0-1: Error: Error during linking In fact, it seems the "-framework" option is simply ignored: [:(][top] % ocamlopt -cclib "-framework FOOBAR" -I +glMLite GL.cmxa Glut.cmxa triangle.ml -o triangle.exe ld: library not found for -lGL collect2: ld returned 1 exit status File "caml_startup", line 1, characters 0-1: Error: Error during linking (and no, there is no FOOBAR framework on my system, I checked ;-) ). I feel like I'm missing something obvious here ... Is there a way to specify a Framework to link against using ocamlopt? Thanks, Alan