caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Alan Schmitt <alan.schmitt@polytechnique.org>
To: caml-list@inria.fr
Subject: [Caml-list] Specifying a framework to link with using ocamlopt?
Date: Wed, 23 Feb 2011 14:10:57 +0100	[thread overview]
Message-ID: <2E007446-C7AD-46D6-8F9C-1377533EF156@polytechnique.org> (raw)

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

             reply	other threads:[~2011-02-23 13:11 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-23 13:10 Alan Schmitt [this message]
2011-02-23 13:33 ` Daniel Bünzli
2011-02-23 13:40   ` Daniel Bünzli
2011-02-23 14:12   ` Alan Schmitt
2011-02-23 13:59 ` David Allsopp
2011-02-23 14:21   ` Alan Schmitt
2011-02-23 14:19     ` David Allsopp
2011-02-23 15:21       ` Alan Schmitt
2011-02-23 15:48         ` David Allsopp
2011-02-23 16:08           ` Alan Schmitt
2011-02-23 16:08             ` David Allsopp

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2E007446-C7AD-46D6-8F9C-1377533EF156@polytechnique.org \
    --to=alan.schmitt@polytechnique.org \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).