Do you just copy the library files and start using it?
On Windows you should use PDCurses:
Download the zip file, unpack it wherever you typically put
external libraries, and check the readme, which tells you the
following:
PDCurses has been ported to DOS, OS/2, Win32, X11 and SDL. A directory containing the port-specific source files exists for each of
these platforms. Build instructions are in the README file for each
platform.
The readme file in the Win32 directory tells you that there are
makefiles for several different compilers. In short, you run make
:
make -f makefilename
It tells mentions a couple of options you can set, including WIDE and
UTF8.
To then use the library, add the directory that contains curses.h
to your include path and link with the pdcurses.lib file that make
generates for you. How you modify your include path and your linked
libraries depends on your development environment and is largely
irrelevant to PDCurses.
Source How do I install PDCurses in Windows for use with C++? by Rob Kennedy
More detailed instructions below.
So are ncurses
and PDcurses
the same?
PDCurses (Pubic Domain Curses) is the multi-platform, public domain
implementation of the terminal display library NCurses.
NCurses (New Curses) is an implementation of Curses (a play on the
term cursor optimization), both of which are terminal control
libraries for UNIX and UNIX-like systems.
Although not identical, PDCurses, NCurses, and Curses enable
programmers to add mouse support, screen painting, colors,
key-mapping, windows, and more to text-based applications without
regard to the terminal type. An example of PDCurses in use is shown
here.
MingW (Minimalist GNU for Windows) is a minimal Open Source
programming environment for developing Windows native applications not
requiring 3rd-party Runtime DLLs. However, MingW does utilize some
Microsoft DLLs provided by the Microsoft C runtime library. It
includes the GNU Compiler Collection (GCC) and associated tools, the
GNU binutils.
Source Adding PDCurses to MingW
Adding PDCurses to MingW
Steps
Download the PDCurses version 3.4 file (Download pdc34dllw.zip (86.9 KB)) from Sourceforge.com and unzip it. This version is the Win32 DLL
for console with Unicode.
Copy the extracted files to the following folders:
pdcurses.lib
to MingW's /lib
folder
curses.h
and panel.h
to MingW's /include
folder
pdcures.dll
to MingW's /bin
folder
Test
Example command using PDCurses to compile the file checkthis.c:
gcc checkthis.c -o checkthis -lpdcurses
If the following code compiles, PDCurses is installed correctly.
/* checkthis.c */
#include <curses.h>
int main()
{
initscr();
wclear(stdscr);
printw("hello world\n");
wrefresh(stdscr);
system("pause");
endwin();
}
Source Adding PDCurses to MingW
What operating system? – DavidPostill – 2016-09-07T14:15:34.133
I am using mingw in windows 10. – Allen – 2016-09-08T14:10:14.447