[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How does one use curses.h? it works better now
From: |
Lionel B |
Subject: |
Re: How does one use curses.h? it works better now |
Date: |
Tue, 20 May 2008 08:47:25 +0000 (UTC) |
User-agent: |
Pan/0.132 (Waxed in Black) |
On Mon, 19 May 2008 17:30:45 -0700, David Chmelik wrote:
> Lionel B wrote:
>
>> Yes; these error messages are not from the compile, but from the link
>> phase, and probably mean that you have not linked in the library
>> containing the actual code for the functions referenced. So to link
>> code for ncurses, you will probably have to specify -lncurses somewhere
>> on your gcc invocation (this is documented in `man ncurses').
>
> Thanks; it compiles now. However, it does not do exactly what I try to
> make it do. I am trying to make a roguelike game just to practice
> various algorithms, and the part I was working on is moving the '@'
> around the screen with the arrow keys and move(). Right now it just
> prints control sequences when I use the arrow keys. I already tried
> this part of the code in DOS Watcom C/C++ and it worked... maybe it is
> the wrong screen mode. Any suggestions on where to read about screen
> modes and keyboard I/O for Posix systems?
'Fraid I'm not very knowledgeable in that area. A good read of `man
ncurses' is probably a good idea, maybe also `man tset' and `man
terminfo'. I see that there is also a debug version of ncurses (which may
or may not be available on your system) which may shed some light on your
problem. Apparently you just link with -lncurses_g rather than -lncurses
and it writes actions to a log file called `trace'.
--
Lionel B