[lug] pitfalls of C++ with ncurses?

D. Stimits stimits at attbi.com
Mon May 5 11:57:49 MDT 2003


Tkil wrote:

> >>>>>"DS" == D Stimits  writes:
>
>
> DS> I was thinking about a console project, written in C++, using
> DS> ncurses, but ncurses does not appear to be the most convenient
> DS> library relative to C++. Does anyone here have any experience with
> DS> C++/ncurses mixing, I'm curious what pitfalls I might run into?
>
> >From my (very limited) curses hacking, it appears that it is already
> somewhat object-oriented -- you have to create screens and windows,
> then do stuff to them, then destroy them.  A simple wrapper class
> should be pretty easy.
>
> Although I'd strongly suggest you look for such a library -- it's so
> obvious, I would be shocked if there weren't a few dozen such
> libraries already available.

I found docs for one such wrapper, but it was written in around 1998, 
and apparently abandoned. The class it talks about uses something from 
libg++, which hasn't been updated since the 2.7.2 days, and has only the 
compat version available. The docs that do show up say that there are no 
real docs, to use the sample source code, but the sample source code is 
also missing from rpm packages. I've updated from a 5.2 version to a 5.3 
version due to additional support of wide characters, but I noticed that 
the same problems on docs and sample code exist for 5.3. There appears 
to be not one shred of docs on the ncurses-c++-devel rpm's, other than 
acknowledgement that they exist. The gnu.org web pages are also quite 
vague relative to C++ documentation. Oh well.

D. Stimits, stimits AT attbi DOT com




More information about the LUG mailing list