caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Alan Schmitt <alan.schmitt@polytechnique.org>
To: David Allsopp <dra-news@metastack.com>
Cc: "'caml-list@inria.fr'" <caml-list@inria.fr>
Subject: Re: [Caml-list] Specifying a framework to link with using ocamlopt?
Date: Wed, 23 Feb 2011 15:21:41 +0100	[thread overview]
Message-ID: <6E137EA1-CD63-43E8-B647-911AB57B7090@polytechnique.org> (raw)
In-Reply-To: <E51C5B015DBD1348A1D85763337FB6D9490F7737@Remus.metastack.local>

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

  reply	other threads:[~2011-02-23 14:21 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-23 13:10 Alan Schmitt
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 [this message]
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=6E137EA1-CD63-43E8-B647-911AB57B7090@polytechnique.org \
    --to=alan.schmitt@polytechnique.org \
    --cc=caml-list@inria.fr \
    --cc=dra-news@metastack.com \
    /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).