Hi,  I was pleasantly suprised to find out about PDCurses. Thank You!
I have successfully built PDCurses33 on my old k6-2 300 mhz laptop
running windows 98 using the Colorado Universties cs1300/mingw gnu
tools setup.
I am not very familiar with the make procedure but with Frank
Krause's outline in an earlier post coupled with the various package
instructions I muddled through.  I thought I'd post what I did:

- My cs1300\mingw installation is at:
    c:\cs1300\mingw

- I unpacked the pdcurs33.zip right next to mingw:
    c:\cs1300\pdcurs33

- I opened an msdos, did a 'doskey',
- and cranked up the gnu tools:
    c:\cs1300\gocs
- Moved to the new pdcurses33 directory:
    cd \cs1300\pdcurs33
- Moved to the win32 directory found there:
    cd win32
- from there I could see the mingwin32.mak:
    ls  (or dir)
- created the Build directory:
    mkdir Build
- copied 'mingw32.mak' to new dir. renaming it to 'Makfile' along the way:
    copy mingwin32.mak Build\Makefile
- Moved to that directory and made sure it was there:
    cd Build
- Ok, so I'm now in:  C:\cs1300\pdcurs33\win32\Build>
- I opened Makefile in an editor:
    edit Makefile      (or other editor)
- With this Makefile I only needed to change line 15
    from:  PDCURSES_SRCDIR = ..
    to  :  PDCURSES_SRCDIR = C:\cs1300\pdcurs33
- From there I typed the command to make all:
    make -f Makefile all
- It made the object files and pdcurses.a file but no curses.h
  It also made some test and demo .exe's except that the tuidemo.exe
  did not build. I've posted the end of the run below.
- So I was miffed at not having an curses.h file produced but after a
  while I noticed that there was one in the
   C:\cs1300\pdcurs33  directory.

- So I placed the curses.h into the C:\cs1300\include directory:
    copy \cs1300\pdcurs33\curses.h  \cs1300\include\curses.h

- And the pdcurses.a file (renamed) into \cs1300\lib:
    copy pdcurses.a  \cs1300\lib\libpdcurses.a

- Then I compiled and ran this test file:
/ * kraustest.c   compile with:
   gcc -Wall -W -pedantic testkraus.c -l pdcurses -o testkraus.exe
* /
#include <curses.h>

int main(void)
{
  initscr();
  wclear(stdscr);
  waddstr(stdscr, "hello world ");
  move(11,25);
  waddstr(stdscr, "Are you seeing this? ");
  move(24,70);
  waddstr(stdscr, "Awesome!");
  wrefresh(stdscr);
  getch();
  endwin();
  return 0;
}
- and it worked fine!
- I also went through the other demos which were built with the make.
- I wound up compiling the tuidemo like this:

  gcc -Wall -W -pedantic tuidemo.c tui.c -l pdcurses -o tuidemo.exe
  tuidemo.c: In function `main':
  tuidemo.c:228: warning: unused parameter `argc'
  tuidemo.c:228: warning: unused parameter `argv'

- and it runs well, , nice example btw.

- but back to the problem noticed in make I'm not sure what happened.
  It seemed to build fine but had this to say at end:
  ... snip in ...
a - pdcscrn.o
a - pdcsetsc.o
a - pdcutil.o                 ////.. linking the last of the obj files
copy pdcurses.a panel.a       ////.. makes the library file
        1 file(s) copied      ////.. then builds the test files
gcc -O2 -Wall  -I\cs1300\pdcurs33
     -otestcurs.exe \cs1300\pdcurs33/demos/testcurs.c pdcurses.a
gcc -O2 -Wall  -I\cs1300\pdcurs33
     -onewdemo.exe \cs1300\pdcurs33/demos/newdemo.c pdcurses.a
gcc -O2 -Wall  -I\cs1300\pdcurs33
     -oxmas.exe \cs1300\pdcurs33/demos/xmas.c pdcurses.a
gcc -c -O2 -Wall  -I\cs1300\pdcurs33 -I\cs1300\pdcurs33/demos
        -otuidemo.o \cs1300\pdcurs33/demos/tuidemo.c
gcc -c -O2 -Wall  -I\cs1300\pdcurs33 -I\cs1300\pdcurs33/demos
        -otui.o \cs1300\pdcurs33/demos/tui.c
gcc  -otuidemo.exe tuidemo.o tui.o
        \cs1300\pdcurs33/curses.h pdcurses.a pdcurses.a
gcc: compilation of header file requested
C:\CS1300\BIN\MAKE.EXE: *** [tuidemo.exe] Error 1
  ... end ...

- The only 'problems' I noticed were that:
- - I got no curses.h        (but not sure if I was supposed to)
- - I got no tuidemo.exe
- - I'm not good with makefiles, but it looks like these
    demos were set to be built:
      firework.exe newdemo.exe rain.exe testcurs.exe worm.exe xmas.exe
    but these are the only ones that did build:
      newdemo.exe  testcurs.exe  xmas.exe
    so something happened to:
      firework.exe  rain.exe  and  worm.exe
Not a problem really, I'll mess with them for fun in the spare time!

Anyhow, I am impressed with the great work you guys have done with
this and really appreciate it as I would think many others do.
I WILL be spreading the word!  Thanks Much!,
++Howard;

Reply via email to