Freitag, 28. Dezember 2012

pdcurses

About

PDCurses is a public domain implementation of Curses which works on Linux, Windows and other systems.

Installation and Quickstart

1. Download pdcurses distribution

Web: http://sourceforge.net/projects/pdcurses/files/pdcurses/
File: PDCurses-3.4.tar.gz

2. Create a program in your path called "copy" which is expected by the makefile

cd %USERPROFILE%\bin
copy c:\mingw\msys\1.0\bin\cp.exe copy.exe

3. Build the library for win32

cd c:\tmp\PDCurses-3.4
cd win32
make -f mingwin32.mak

4. Rename the archive files in a GNU-conformant fashion

mv pdcurses.a libpdcurses.a
mv panel.a libpanel.a

5. Compile a test program

gcc -L. -I.. -Wall -o firework ../demos/firework.c -lpdcurses

6. Install library and headers into reasonable places

# Make new directories for the lib and includes
mkdir %USERPROFILE%\lib\pdcurses
mkdir %USERPROFILE%\include\pdcurses
# Add the lib and include directories to your CPATH and LIBRARY_PATH, respectively
# ...
# Copy the lib and includes to where they belong
cp -v libpdcurses.a libpanel.a "%USERPROFILE%/lib/pdcurses"
cp -v ../*.h "%USERPROFILE%/include/pdcurses"

7. Copy tui.c, tui.h and tuidemo.c to a new directory and try compiling it:

gcc -Wall -c tui.c -lpdcurses
gcc -Wall -c tuidemo.c -lpdcurses
gcc -Wall -o tuidemo tuidemo.o tui.o -lpdcurses
tuidemo

8. Install the manpages under Cygwin

Run Cygwin's setup.exe
Install packages libncurses-devel and libncursesw-devel

Resources for Learning Curses


General Information on Curses


Keine Kommentare:

Kommentar veröffentlichen