List Info

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




"ocaml_beginners"::[] OCaml curses in native mode
country flaguser name
France
2008-02-29 16:22:55

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'...

Maybe I've missed something huge ?

Thanks for any light.

Regards,

Fabrice

__._,_.___
.

__,_._,___
Re: "ocaml_beginners"::[] OCaml curses in native mode
country flaguser name
United Kingdom
2008-03-01 11:08:26

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

__._,_.___
.

__,_._,___
Re: "ocaml_beginners"::[] OCaml curses in native mode
country flaguser name
France
2008-03-01 11:12:04
>   Hi !
Hi Fabrice !

>   OCaml curses :
> http://www.nongnu.or
g/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)

-- 


Archives up to November 11, 2006 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:
    ht
tp://groups.yahoo.com/group/ocaml_beginners/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:ocaml_beginners-digest@yahoogroups.com 
    mailto:ocaml_beginners-fullfeatured@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
    ocaml_beginners-unsubscribe@yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.c
om/info/terms/
 

Re: "ocaml_beginners"::[] OCaml curses in native mode
country flaguser name
France
2008-03-01 11:18:36

On Sat, 1 Mar 2008 17:08:26 +0000
Richard Jones < rich%40annexia.org">richannexia.org> 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

__._,_.___
.

__,_._,___
Re: "ocaml_beginners"::[] OCaml curses in native mode
country flaguser name
France
2008-03-01 11:31:32

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:
&gt;
> 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

__._,_.___
.

__,_._,___
Re: "ocaml_beginners"::[] OCaml curses in native mode
country flaguser name
United States
2008-03-01 13:45:34

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

__._,_.___
.

__,_._,___
Re: "ocaml_beginners"::[] OCaml curses in native mode
country flaguser name
France
2008-03-01 14:35:24

On Sat, 1 Mar 2008 14:45:34 -0500
Eric Cooper < ecc%40cmu.edu">ecccmu.edu&gt; wrote:

> In Debian, just apt-get install these:
&gt; $ apt-cache search curses | grep ocaml
&gt; 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 !

__._,_.___
.

__,_._,___
[1-7]

about | contact  Other archives ( Real Estate discussion Medical topics )