caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: David Allsopp <dra-news@metastack.com>
To: "'Alan Schmitt'" <alan.schmitt@polytechnique.org>
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 14:19:33 +0000	[thread overview]
Message-ID: <E51C5B015DBD1348A1D85763337FB6D9490F78E2@Remus.metastack.local> (raw)
In-Reply-To: <6E137EA1-CD63-43E8-B647-911AB57B7090@polytechnique.org>

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


  reply	other threads:[~2011-02-23 14:26 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
2011-02-23 14:19     ` David Allsopp [this message]
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=E51C5B015DBD1348A1D85763337FB6D9490F78E2@Remus.metastack.local \
    --to=dra-news@metastack.com \
    --cc=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).