Best "Curses" Library?

closed account (967L1hU5)
First off, I know there won't be a "best" library, each one will have it's pro's and con's, but I'm wondering which one is the easiest to use, and has good documentation for a relative new programmer. I have PD Curses, but I've heard others are better for cross-compatibly.
You've been misinformed.

There is only one "curses" (well, there's the really old version of curses, which you can safely ignore).

NCurses is the POSIX library implementation. Use it if you are compiling on *nix.
PDCurses is the non-POSIX implementation. Use it if you are compiling on Windows, OS/2, DOS, etc.

The two implementations have some differences, but they are relatively minor.
closed account (967L1hU5)
Oh, thanks! Do you know where I could find an online tutorial for PD Curses?
http://www.google.com/search?q=ncurses

The NCURSES Programming HOWTO is the best place to start.
closed account (967L1hU5)
http://tldp.org/HOWTO/NCURSES-Programming-HOWTO/

I have already visited this page. And since I'm a learner-by-doing, when I would copy the code (except for ncurses.h, I used pdcurses.h and panal.h), I would get errors.
I was unaware that the howto told you to #include <ncurses.h>, as this is almost always an error. (It has been a long time since I've read it myself.) You should #include <curses.h> .

If you really want to use <ncurses.h>, you'll have to create a new file in your 'include' directory:

C:\MinGW\include\ncurses.h
1
2
3
/* NCurses is the wrong include. We fix it here to the correct one. */
#include <curses.h>


When you compile, make sure to link with the proper library.

    g++ ... myprog.cpp -lpdcurses


Here are a few examples to help you out:

http://www.cplusplus.com/forum/general/497/#msg1734

Very basic example:
http://www.cplusplus.com/forum/beginner/4520/#msg19965

Playing with colors:
http://www.cplusplus.com/forum/general/11032/#msg52049
http://www.cplusplus.com/forum/general/11032/2/#msg52617

Good luck!

[edit] BTW, what is <panal.h>?
Last edited on
closed account (967L1hU5)
Thank you!
Topic archived. No new replies allowed.