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%\bincopy c:\mingw\msys\1.0\bin\cp.exe copy.exe
3. Build the library for win32
cd c:\tmp\PDCurses-3.4cd win32
make -f mingwin32.mak
4. Rename the archive files in a GNU-conformant fashion
mv pdcurses.a libpdcurses.amv panel.a libpanel.a
5. Compile a test program
gcc -L. -I.. -Wall -o firework ../demos/firework.c -lpdcurses6. Install library and headers into reasonable places
# Make new directories for the lib and includesmkdir %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 -lpdcursesgcc -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.exeInstall packages libncurses-devel and libncursesw-devel
Resources for Learning Curses
- http://math.hws.edu/orr/s04/cpsc225/curses.html
- http://www.tldp.org/HOWTO/html_single/NCURSES-Programming-HOWTO/
- http://heather.cs.ucdavis.edu/~matloff/UnixAndC/CLanguage/Curses.pdf
Keine Kommentare:
Kommentar veröffentlichen