You need to install it first.
http://www.projectpluto.com/win32a.htm
Sigh. A quick tutorial. Using C::B to run a makefile is not fun, so I recommend you compile from the command prompt directly. Here's how.
Download and setup
Get
http://www.projectpluto.com/win32a.zip
Save it somewhere useful. I saved mine at
C:\Users\Michael\Programming\Curses.
In Windows Explorer, right-click the file and select "Extract all..." from the popup menu.
Double click on the new directory.
Open a command prompt there. (Press
Alt-D to highlight the address bar and type
cmd.exe
.)
Type
g++ --version
to verify that MinGW will work. If it does not, you need to add it to the path:
For
most standard MinGW installations, type
path C:\MinGW\bin;%PATH%
For TDM-GCC-w64, type
path C:\TDM-GCC-64\bin;%PATH%
(If your MinGW is somewhere else, substitute the correct path.)
Compiling
Now type the following commands.
1 2
|
cd win32a
mingw32-make -f mingwin32.mak WIDE=Y UTF8=Y
|
That was easy!
Installing
We're going to put the new "pdcurses.a" and "panel.a" library files where they belong in the MinGW subdirectory. We're also going to put the public header files where they belong in MinGW.
As in my post above, I wanted the standard PDCurses and Pluto's to be both available, so I renamed the "pdcurses.a" to "libpdcurses.win32a.a" and the "panel.a" to "libpanel.win32.a". You can do the same, but the following assumes you wish to simply use the win32a curses only and overwrite any extant libpdcurses.a and libpanel.a files.
Standard MinGW:
1 2 3 4 5
|
copy ..\curses.h C:\MinGW\include
copy ..\panel.h C:\MinGW\include
copy ..\term.h C:\MinGW\include
copy pdcurses.a C:\MinGW\mingw32\lib\libpdcurses.a
copy panel.a C:\MinGW\mingw32\lib\libpanel.a
|
TDM-GCC-w64:
1 2 3 4 5
|
copy ..\curses.h C:\TDM-GCC-64\x86_64-w64-mingw32\include\
copy ..\panel.h C:\TDM-GCC-64\x86_64-w64-mingw32\include\
copy ..\term.h C:\TDM-GCC-64\x86_64-w64-mingw32\include\
copy pdcurses.a C:\TDM-GCC-64\x86_64-w64-mingw32\lib\libpdcurses.a
copy panel.a C:\TDM-GCC-64\x86_64-w64-mingw32\lib\libpanel.a
|
32-bit
Some MinGW's are capable of both 32-bit and 64-bit compiles. Those MinGWs will produce a 64-bit library by default. In order to
also get a 32-bit version we will have to compile one.
Open the
mingwin32.mak file and insert two lines to modify
CFLAGS and
LDFLAGS:
44 45 46 47 48 49 50 51 52 53 54 55
|
ifeq ($(DEBUG),Y)
CFLAGS = -g -Wall -DPDCDEBUG
LDFLAGS = -g
else
CFLAGS = -O4 -Wall
LDFLAGS =
endif
CFLAGS += -m32
LDFLAGS += -m32
CFLAGS += -I$(PDCURSES_SRCDIR)
|
<-- insert this line
<-- and this line |
[edit] Don't forget to delete all the .o files first! [/edit]
Then recompile and copy the resulting library files as before, except to the lib32 directory:
1 2
|
copy pdcurses.a C:\TDM-GCC-64\x86_64-w64-mingw32\lib32\libpdcurses.a
copy panel.a C:\TDM-GCC-64\x86_64-w64-mingw32\lib32\libpanel.a
|
Now your MinGW will properly compile with PDCurses when you specify the
-m32
or
-m64
flag.
Whew. All done!
Edited to make the DOS commands a little more readable...