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

Re: "ocaml_beginners"::[] OCaml curses in native mode

Expand Messages
  • Richard Jones
    ... Have you actually got the curses/ncurses library installed? Rich. -- Richard Jones Red Hat
    Message 1 of 7 , Mar 1, 2008
    View Source
    • 0 Attachment
      On Fri, Feb 29, 2008 at 11:22:55PM +0100, Fabrice Marchant wrote:
      > Hi !
      >
      > OCaml curses :
      > http://www.nongnu.org/ocaml-tmk/
      >
      > builds and runs fine in byte mode.
      > However, about generating native mode test.opt, I get this :
      >
      > pb:~/ocaml/curses/ocaml-curses-1.0.2$ make test.opt 2>&1 |more
      > make[1]: Entering directory `/home/fabrice/ocaml/curses/ocaml-curses-1.0.2'
      > make[1]: `libcurses_stubs.a' is up to date.
      > make[1]: `curses.cmxa' is up to date.
      > make[1]: Leaving directory `/home/fabrice/ocaml/curses/ocaml-curses-1.0.2'
      > ocamlopt -I . -o test.opt curses.cmxa test.ml
      > ./libcurses_stubs.a(ml_curses.o): In function `winch_handler':
      > /home/fabrice/ocaml/curses/ocaml-curses-1.0.2/ml_curses.c:163: undefined reference to `u
      > ngetch'
      > ./libcurses_stubs.a(ml_curses.o): In function `mlcurses_addch':
      > /home/fabrice/ocaml/curses/ocaml-curses-1.0.2/functions.c:3: undefined reference to `std
      > scr'
      > /home/fabrice/ocaml/curses/ocaml-curses-1.0.2/functions.c:3: undefined reference to `wad
      > dch'...

      Have you actually got the curses/ncurses library installed?

      Rich.

      --
      Richard Jones
      Red Hat
    • Florent Monnier
      ... Hi Fabrice ! ... The instruction -lncurses is missing while building the .cmxa But while using the .cmxa users can still provide this linking
      Message 2 of 7 , Mar 1, 2008
      View Source
      • 0 Attachment
        > Hi !
        Hi Fabrice !

        > OCaml curses :
        > http://www.nongnu.org/ocaml-tmk/
        >
        > builds and runs fine in byte mode.
        > However, about generating native mode test.opt, I get this :

        The instruction "-lncurses" is missing while building the .cmxa
        But while using the .cmxa users can still provide this linking instruction:
        ocamlopt -cclib -lncurses -I . -o test curses.cmxa test.ml

        But it would be more handy to fix the problem in the .cmxa itself,
        on my computer the problem is fixed when I use this compilation line:

        ocamlopt -a -cclib -lncurses -cclib -lcurses_stubs -o curses.cmxa \
        keys.cmx curses.cmx

        We could also be willing to get the proper command from the Makefile
        which uses OCamlMakefile, so it can be fixed adding:
        CLIBS = ncurses

        I'm not sure who is the maintainer of this package (I've sent an email to
        richard to notice)

        --
      • Fabrice Marchant
        On Sat, 1 Mar 2008 17:08:26 +0000 ... Thanks, The related packages installed on my debian Sid are : pb:~/projects/chess$ dpkg -l | grep curses ii dav-text
        Message 3 of 7 , Mar 1, 2008
        View Source
        • 0 Attachment
          On Sat, 1 Mar 2008 17:08:26 +0000
          Richard Jones <rich@...> wrote:

          > Have you actually got the curses/ncurses library installed?
          >
          > Rich.


          Thanks,

          The related packages installed on my debian Sid are :

          pb:~/projects/chess$ dpkg -l | grep curses
          ii dav-text 0.8.5-5 A minimalist ncurses-based text editor
          ii libncurses5 5.6+20071124-1 Shared libraries for terminal handling
          ii libncurses5-dev 5.6+20071124-1 Developer's libraries and docs for ncurses
          ii libncursesw5 5.6+20071124-1 Shared libraries for terminal handling (wide charact
          ii ncurses-base 5.6+20080119-1 Descriptions of common terminal types
          ii ncurses-bin 5.6+20080119-1 Terminal-related programs and man pages
          ii ncurses-term 5.6+20080119-1 Additional terminal type definitions
          ii ninvaders 0.1.1-2 A space invaders-like game using ncurses

          pb:~/projects/chess$ dpkg -l | grep curses | grep dev
          ii libncurses5-dev 5.6+20071124-1 Developer's libraries and docs for ncurses

          I suppose its OK about this ?

          Regards,

          Fabrice
        • Fabrice Marchant
          Hi Florent ! ... Great ! Works fine on my computer too. ... I notice another small fixable thing, but in a no more maintained zone, subdir tmk, Makefile, line
          Message 4 of 7 , Mar 1, 2008
          View Source
          • 0 Attachment
            Hi Florent !
            > But it would be more handy to fix the problem in the .cmxa itself,
            > on my computer the problem is fixed when I use this compilation line:
            >
            > ocamlopt -a -cclib -lncurses -cclib -lcurses_stubs -o curses.cmxa \
            > keys.cmx curses.cmx

            Great !
            Works fine on my computer too.

            > We could also be willing to get the proper command from the Makefile
            > which uses OCamlMakefile, so it can be fixed adding:
            > CLIBS = ncurses

            I notice another small fixable thing, but in a no more maintained zone, subdir tmk, Makefile, line 43 :
            replace mlcurses.cma by curses.cma, in order to build the coloured test.

            Friendly,

            Fabrice
          • Eric Cooper
            In Debian, just apt-get install these: $ apt-cache search curses | grep ocaml libcurses-ocaml - OCaml bindings for the ncurses library libcurses-ocaml-dev -
            Message 5 of 7 , Mar 1, 2008
            View Source
            • 0 Attachment
              In Debian, just apt-get install these:
              $ apt-cache search curses | grep ocaml
              libcurses-ocaml - OCaml bindings for the ncurses library
              libcurses-ocaml-dev - OCaml bindings for the ncurses library

              --
              Eric Cooper e c c @ c m u . e d u
            • Fabrice Marchant
              On Sat, 1 Mar 2008 14:45:34 -0500 ... Oh ! I completely had missed the package. It should be rather new. Many thanks !
              Message 6 of 7 , Mar 1, 2008
              View Source
              • 0 Attachment
                On Sat, 1 Mar 2008 14:45:34 -0500
                Eric Cooper <ecc@...> wrote:

                > In Debian, just apt-get install these:
                > $ apt-cache search curses | grep ocaml
                > libcurses-ocaml - OCaml bindings for the ncurses library
                > libcurses-ocaml-dev - OCaml bindings for the ncurses library

                Oh ! I completely had missed the package.
                It should be rather new.

                Many thanks !
              Your message has been successfully submitted and would be delivered to recipients shortly.