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

ocamlbuild not finding godi packages in pkg-lib

Expand Messages
  • Martin DeMello
    Trying to get up and running with ocamlbuild. This is my build.sh so far; my question is how I can avoid adding -I /opt/godi/lib/ocaml/pkg-lib/package to the
    Message 1 of 2 , Oct 1, 2008
    • 0 Attachment
      Trying to get up and running with ocamlbuild. This is my build.sh so
      far; my question is how I can avoid adding -I
      /opt/godi/lib/ocaml/pkg-lib/package to the cflags for every package I
      use.

      -------------------------------------------------------------------------------
      MICMATCH=/opt/godi/lib/ocaml/pkg-lib/micmatch_pcre/
      PP="camlp5o -I $MICMATCH pa_micmatch_pcre.cma"
      LEDIT=/home/martin/code/varix/ledit
      CFLAGS=-I,$LEDIT,-I,/opt/godi/lib/ocaml/pkg-lib/pcre
      LFLAGS=-I,$LEDIT
      ocamlbuild -clean
      ocamlbuild -cflags $CFLAGS -lflags $LFLAGS -libs
      bigarray,unix,str,pcre,run_micmatch_pcre,ledit -pp "$PP" varix.native
      -------------------------------------------------------------------------------
    • Ashish Agarwal
      Use the myocamlbuild.ml file provided at: http://brion.inria.fr/gallium/index.php/Using_ocamlfind_with_ocamlbuild Then in your _tags file you can just add the
      Message 2 of 2 , Oct 2, 2008
      • 0 Attachment
        Use the myocamlbuild.ml file provided at:
        http://brion.inria.fr/gallium/index.php/Using_ocamlfind_with_ocamlbuild

        Then in your _tags file you can just add the tag pkg_xx, where xx is any
        package handled by findlib. If you need a library that is not handled by
        findlib, then you just add the following line to your myocamlbuild.ml file,
        after After_rules

        ocaml_lib ~extern:true ~dir:"path/to/library/files" "libname";

        This creates the tag use_libname, which you can then use in _tags.


        On Thu, Oct 2, 2008 at 12:40 AM, Martin DeMello <martindemello@...>wrote:

        > Trying to get up and running with ocamlbuild. This is my build.sh so
        > far; my question is how I can avoid adding -I
        > /opt/godi/lib/ocaml/pkg-lib/package to the cflags for every package I
        > use.
        >
        > ----------------------------------------------------------
        > MICMATCH=/opt/godi/lib/ocaml/pkg-lib/micmatch_pcre/
        > PP="camlp5o -I $MICMATCH pa_micmatch_pcre.cma"
        > LEDIT=/home/martin/code/varix/ledit
        > CFLAGS=-I,$LEDIT,-I,/opt/godi/lib/ocaml/pkg-lib/pcre
        > LFLAGS=-I,$LEDIT
        > ocamlbuild -clean
        > ocamlbuild -cflags $CFLAGS -lflags $LFLAGS -libs
        > bigarray,unix,str,pcre,run_micmatch_pcre,ledit -pp "$PP" varix.native
        > ----------------------------------------------------------
        >
        >


        [Non-text portions of this message have been removed]
      Your message has been successfully submitted and would be delivered to recipients shortly.