Hello everyone,

Been using daniweb to solve most of my programming problems as a guest, and figured it was time to create an account.

The problem I'm having, is that I have an assignment that requires use of the ncurses library. I have a partial program that I have to finish fleshing out, and I know what code I need to write to make it work, however when I go to test it and make sure it works, I keep getting "curses.h" not found.

I've used

#include <curses>
#include <curses.h>
#include <ncurses>
#include <ncurses.h>
etc. with varying degrees of success.

The reason I say varying degrees of success is sometimes it can't find curses, and sometimes it apparently can, but errors are then thrown that functions like initscr() and refresh() aren't defined.

I did a search on my computer, can couldn't find curses.h or ncurses.h, so I went out looking for it, and got ncurses5.7, but it doesn't have the file in it either. It has files like cursesp.h, cursesf.h, etc.

Can I only use the curses library in a Unix environment? Or can I set it up so I can use this as is?

Any help would be greatly appreciated!

~Nick

Can I only use the curses library in a Unix environment? Or can I set it up so I can use this as is?

If you are using it in Windows, you need something like pdcurses.
They have the dlls available zipped but you can also build it into static libraries from source (extract the source code zipfile, e.g, pdcurs34.zip, and in the win32 subdirectory there are makefiles for most of the popular compilers). Make sure to edit the makefile to reflect the location into which you extracted the source.

That should hopefully give you a head start.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.