caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] Specifying a framework to link with using ocamlopt?
@ 2011-02-23 13:10 Alan Schmitt
  2011-02-23 13:33 ` Daniel Bünzli
  2011-02-23 13:59 ` David Allsopp
  0 siblings, 2 replies; 11+ messages in thread
From: Alan Schmitt @ 2011-02-23 13:10 UTC (permalink / raw)
  To: caml-list

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2011-02-23 16:13 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-23 13:10 [Caml-list] Specifying a framework to link with using ocamlopt? 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
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

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).