13976Re: "ocaml_beginners":: using opam ?
- Nov 6, 2013I see, thanks. I use OcamlMakefile, it would be great if I could still use the PACK option. I'm going to try.
is there a way to tell opam to use the standard location /usr/lib/ocaml
or maybe this is not recommended ?
Le 06/11/2013 18:49, Ashish Agarwal a écrit :OPAM installs the package, but you still have to tell your program to use it. In the interactive toplevel you have to do:# #require "foo"For compiling a file, it depends on what build toolchain you are using. At the lowest level, you are using directly the compilers ocamlc or ocamlopt. See the User Manual for the options you have to use.- see Chapters 8 and 11.You may however want to use Oasis, which let's you specify your build more easily. In your _oasis file, you have to specify the packages in the BuildDepends field. See the Oasis documentation:
On Wed, Nov 6, 2013 at 11:44 AM, Vu Ngoc San <san.vu-ngoc@...> wrote:
I just went through the OPAM web page.
and I have a very stupid question.
It says it is a package manager for ocaml.
I assume it means that it can do the following:
I want to install a library foo -->
1) I type opam install foo
2) and then I can use foo in my ocaml programs ?
The stupid thing is that I don't know how to do 2). The packages seem to
be installed in
$HOME/.opam/system/lib, whereas I have a preexisting ocaml install (ubuntu).
Do it mean that I need to include this DIR in my Makefile ?
Of course I can do it, but I see no reference to this in the OPAM FAQ,
and it seems not very user friendly to me, so I must be missing something.
I would expect a package manager that gives me immediately usable
libraries like gem for ruby, but maybe this is not the goal ?
- << Previous post in topic Next post in topic >>