Re: using opam ?
Ashish Agarwal <[email protected]>
| Newsgroups | gmane.comp.lang.ocaml.beginners |
|---|---|
| Message-ID | <CAMu2m2+2Pc52KavsRH4NT2sKBfJaDb4d=HRx-HVMdEM4MuuR6w@mail.gmail.com> |
On Wed, Nov 6, 2013 at 1:06 PM, Vu Ngoc San <[email protected]> wrote: I see, thanks. I use OcamlMakefile, it would be great if I could still > use the PACK option. > I don't use OcamlMakefile, so I might be wrong, but PACK sounds like it has to do with packing multiple modules (in your code) into one module. This is unrelated to your original question. See the -pack option in the User Manual. is there a way to tell opam to use the standard location /usr/lib/ocaml > or maybe this is not recommended ? > This is not recommended. OPAM keeps everything under a single directory that is fully under its control. This is quite nice. You can delete this one directory to start fresh if needed. > > 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. > http://caml.inria.fr/pub/docs/manual-ocaml/ > - 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: > http://oasis.forge.ocamlcore.org/documentation.html > > > > > > On Wed, Nov 6, 2013 at 11:44 AM, Vu Ngoc San <[email protected]>wrote: > >> >> >> Dear list >> >> I just went through the OPAM web page. >> http://opam.ocaml.org/ >> 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 ? >> >> San >> > > > >