PDCURSES howto

From Open Watcom

Revision as of 11:22, 24 June 2010; view current revision
←Older revision | Newer revision→
Jump to: navigation, search

I'm currently working with Open Watcom 1.9. To build pdcurses libraries and example programs with Open Watcom, you can try these steps.

Download latest version of pdcurses from Sourceforge. Decompress and unarchive the pdcurses file. I use 7za (command line version of 7zip) for convenience. Here's an example:

7za x PDCurses-3.4.tar.gz
7za x PDCurses-3.4.tar

Be sure to change any necessary names for version numbers and tools you're using.

Go to source code directory. For example:

cd PDCurses-3.4

If I try to build using the Watcom makefile and wmake I receive the following error:

Error(E70): Cannot Load/Unload DLL (wlink)

I'm able to use the link command stand-alone from a Command prompt, but it doesn't seem to work when run through wmake. If you substitute the $(LINK) commands in watcom.mif for something that shells out to a command.com, it appears to link properly again. Here's a line to make the substitution in a more automated way:

perl -i.bk1 -pe "s|\$\(LINK\)|command /c \$\(LINK\)|g" watcom.mif

It can be used in a batch or shell script. I use Perl because I have it installed. You can also use tools such as sed or gsar (Windows versions available from the Gnuwin32 project at Sourceforge) to automate the replacement.

Now, find the wmake makefile and run it.

cd win32
wmake -f wccwin32.mak WIDE=Y UTF8=Y all

You can automate the process by putting all these lines in a batch file or bash shell script. I also add some lines in my own scripts to put the executables and libraries in the subdirectories I want for packaging.

Personal tools