Re: using opam ?
Francois Berenger <[email protected]>
| Newsgroups | gmane.comp.lang.ocaml.beginners |
|---|---|
| Message-ID | <[email protected]> |
On 11/07/2013 02:49 AM, Ashish Agarwal wrote: > 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 There is also obuild, in case you don't like the default build system used by oasis: Cf. https://github.com/vincenthz/obuild > On Wed, Nov 6, 2013 at 11:44 AM, Vu Ngoc San <[email protected] > <mailto:[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 > > > -- Best regards, Francois Berenger. ------------------------------------ Archives up to December 31, 2011 are also downloadable at http://www.connettivo.net/cntprojects/ocaml_beginners The archives of the very official ocaml list (the seniors' one) can be found at http://caml.inria.fr Attachments are banned and you're asked to be polite, avoid flames etc.Yahoo Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/ocaml_beginners/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/ocaml_beginners/join (Yahoo! ID required) <*> To change settings via email: [email protected] [email protected] <*> To unsubscribe from this group, send an email to: [email protected] <*> Your use of Yahoo Groups is subject to: http://info.yahoo.com/legal/us/yahoo/utos/terms/