What is PDCurses-SO ?
PDCurses is an easy package from PDCurses built for CodeBlocks user in Windows, to install Curses in 5 minutes. Tested x86 architectures, if you have any problem with this package, refer you to Slashon forum (asking in English, French, Spanish, Polish or Swedish) : http://community.slashon.com [Category : C]
Install
It's very easy to install this package. You just have to extract and then click 'PDCursesSo-Setup.exe' to install it on Code::Blocks.
For example : C:\Program Files\CodeBlocks\PDCurses-SO
Code::blocks Settings
Linker Settings
Run Code::blocks, click on Settings -> Compiler and Debugger and go on Linker Settings.
Here you can add a couple of libraries :
- C:\Program Files\CodeBlocks\PDCurses-SO\win32\panel.a
- C:\Program Files\CodeBlocks\PDCurses-SO\win32\pdcurses.a
Search Directories
In 'Search directories' you have 3 sections : Compiler, Linker, Resource compiler. For each add these 2 links :
- C:\Program Files\CodeBlocks\PDCurses-SO
- C:\Program Files\CodeBlocks\PDCurses-SO\win32
Hello World ! (test)
Now - Run Code::Blocks starting a new Console Application (/!\ Project) :
#include <curses.h>
int main()
{
initscr(); /* Start curses mode */
printw("Hello World !!!"); /* Print Hello World */
refresh(); /* Print it on to the real screen */
getch(); /* Wait for user input */
endwin(); /* End curses mode */
return 0;
}
About nCurses
- Manual : http://invisible-island.net/ncurses/man/ncurses.3x.html
- Tutorial : http://tldp.org/HOWTO/NCURSES-Programming-HOWTO/

