Loading ...
Sorry, an error occurred while loading the content.

390Re: "ocaml_beginners"::[] ocaml libraries and using your own

Expand Messages
  • YAMAGATA yoriyuki
    Jul 3, 2002
    • 0 Attachment
      From: "bwv211mail" <bwv211mail@...>
      Subject: "ocaml_beginners"::[] ocaml libraries and using your own
      Date: Tue, 02 Jul 2002 21:48:55 -0000

      > I would like to have my own "local standard"
      > libraries that are automagically searched for, but I can't find a
      > way to do it - I always have to end up specifying "mylib.cma" or
      > "mylib.cmxa" on the command line... it finds the .cmi files all
      > right without anything but the -I switch...

      As far as I know, there is no way to do so. I guess the reason is
      that libraries can have side effects. So, the linker (you need to
      specify "mylib.cma" only for a linking phase, not compilation.) has to
      know in what order libraries should be loaded. Correct me if I said
      something wrong.

      For the toplevel (interactive evaluation), you can create the toplevel
      with preloaded "mylib.cma" as

      $ ocamlmktop -o mytoplevel mylib.cma

      See section 9.5 in the manual.
      --
      Yamagata Yoriyuki
      http://www.mars.sphere.ne.jp/yoriyuki/
    • Show all 2 messages in this topic