[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Ocaml-tmk-devel] Minor problems linking with ocaml-curses (linkopts not
From: |
Jeff Meister |
Subject: |
[Ocaml-tmk-devel] Minor problems linking with ocaml-curses (linkopts not specified in META) |
Date: |
Mon, 19 Nov 2007 06:48:04 -0500 |
Since OCaml Curses was installed via findlib, I assumed I could
compile programs using the library with "ocamlfind ocamlopt -package
curses ..." and link with "ocamlfind ocamlopt -package curses -linkpkg
...". However, doing so produced tons of linker errors regarding
undefined symbols.
A quick look at "ocamlfind query -l curses" shows that no linkopts are
specified for the package. I can think of three ways to fix this:
1. Calling "ocamlfind ocamlopt -package curses -linkpkg -cclib
-lcurses ..." fixes the problems, though I don't think this is an
especially good solution; -linkpkg implies that findlib should be
taking care of all the linking for us, no?
2. Editing the META file to contain "linkopts = -cclib -lcurses" tells
findlib to add that parameter.
3. When building curses.cm[x]a, if you specify "-cclib -lcurses", that
will be recorded into the archive and automatically performed by the
compiler, removing the need for linkopts.
Just thought you guys might want to know---not sure if this qualifies
as a bug. Thanks for the bindings, in any case!
- [Ocaml-tmk-devel] Minor problems linking with ocaml-curses (linkopts not specified in META),
Jeff Meister <=