views:

440

answers:

1

Hello,

I am having a problem compiling pdcurses 3.4 in my machine. My OS is windows XP SP3.

My mingw32-make is version 3.81.

According to the readme file all I had to do was go and issue a make command to get it done. And so I did.

 mingw32-make -f mingwin32.mak

This starts the make process but it fails somewhere along the way in two places. One is ignored and the other stops the make.

EDIT: Added the whole log, instead of just the error. Warning ... it is big. As you can see changing copy with xcopy solved the copy problem.

gcc -c -O2 -Wall -I.. ../pdcurses/addch.c
gcc -c -O2 -Wall -I.. ../pdcurses/addchstr.c
gcc -c -O2 -Wall -I.. ../pdcurses/addstr.c
gcc -c -O2 -Wall -I.. ../pdcurses/attr.c
gcc -c -O2 -Wall -I.. ../pdcurses/beep.c
gcc -c -O2 -Wall -I.. ../pdcurses/bkgd.c
gcc -c -O2 -Wall -I.. ../pdcurses/border.c
gcc -c -O2 -Wall -I.. ../pdcurses/clear.c
gcc -c -O2 -Wall -I.. ../pdcurses/color.c
gcc -c -O2 -Wall -I.. ../pdcurses/delch.c
gcc -c -O2 -Wall -I.. ../pdcurses/deleteln.c
gcc -c -O2 -Wall -I.. ../pdcurses/deprec.c
gcc -c -O2 -Wall -I.. ../pdcurses/getch.c
gcc -c -O2 -Wall -I.. ../pdcurses/getstr.c
gcc -c -O2 -Wall -I.. ../pdcurses/getyx.c
gcc -c -O2 -Wall -I.. ../pdcurses/inch.c
gcc -c -O2 -Wall -I.. ../pdcurses/inchstr.c
gcc -c -O2 -Wall -I.. ../pdcurses/initscr.c
gcc -c -O2 -Wall -I.. ../pdcurses/inopts.c
gcc -c -O2 -Wall -I.. ../pdcurses/insch.c
gcc -c -O2 -Wall -I.. ../pdcurses/insstr.c
gcc -c -O2 -Wall -I.. ../pdcurses/instr.c
gcc -c -O2 -Wall -I.. ../pdcurses/kernel.c
gcc -c -O2 -Wall -I.. ../pdcurses/keyname.c
gcc -c -O2 -Wall -I.. ../pdcurses/mouse.c
gcc -c -O2 -Wall -I.. ../pdcurses/move.c
gcc -c -O2 -Wall -I.. ../pdcurses/outopts.c
gcc -c -O2 -Wall -I.. ../pdcurses/overlay.c
gcc -c -O2 -Wall -I.. ../pdcurses/pad.c
gcc -c -O2 -Wall -I.. ../pdcurses/panel.c
gcc -c -O2 -Wall -I.. ../pdcurses/printw.c
gcc -c -O2 -Wall -I.. ../pdcurses/refresh.c
gcc -c -O2 -Wall -I.. ../pdcurses/scanw.c
gcc -c -O2 -Wall -I.. ../pdcurses/scr_dump.c
gcc -c -O2 -Wall -I.. ../pdcurses/scroll.c
gcc -c -O2 -Wall -I.. ../pdcurses/slk.c
gcc -c -O2 -Wall -I.. ../pdcurses/termattr.c
gcc -c -O2 -Wall -I.. ../pdcurses/terminfo.c
gcc -c -O2 -Wall -I.. ../pdcurses/touch.c
gcc -c -O2 -Wall -I.. ../pdcurses/util.c
gcc -c -O2 -Wall -I.. ../pdcurses/window.c
gcc -c -O2 -Wall -I.. ../pdcurses/debug.c
gcc -c -O2 -Wall -I.. ../win32/pdcclip.c
gcc -c -O2 -Wall -I.. ../win32/pdcdisp.c
gcc -c -O2 -Wall -I.. ../win32/pdcgetsc.c
gcc -c -O2 -Wall -I.. ../win32/pdckbd.c
gcc -c -O2 -Wall -I.. ../win32/pdcscrn.c
gcc -c -O2 -Wall -I.. ../win32/pdcsetsc.c
gcc -c -O2 -Wall -I.. ../win32/pdcutil.c
ar rcv pdcurses.a addch.o addchstr.o addstr.o attr.o beep.o bkgd.o border.o clea
r.o color.o delch.o deleteln.o deprec.o getch.o getstr.o getyx.o inch.o inchstr.
o initscr.o inopts.o insch.o insstr.o instr.o kernel.o keyname.o mouse.o move.o
outopts.o overlay.o pad.o panel.o printw.o refresh.o scanw.o scr_dump.o scroll.o
slk.o termattr.o terminfo.o touch.o util.o window.o debug.o pdcclip.o pdcdisp.o
pdcgetsc.o pdckbd.o pdcscrn.o pdcsetsc.o pdcutil.o
a - addch.o
a - addchstr.o
a - addstr.o
a - attr.o
a - beep.o
a - bkgd.o
a - border.o
a - clear.o
a - color.o
a - delch.o
a - deleteln.o
a - deprec.o
a - getch.o
a - getstr.o
a - getyx.o
a - inch.o
a - inchstr.o
a - initscr.o
a - inopts.o
a - insch.o
a - insstr.o
a - instr.o
a - kernel.o
a - keyname.o
a - mouse.o
a - move.o
a - outopts.o
a - overlay.o
a - pad.o
a - panel.o
a - printw.o
a - refresh.o
a - scanw.o
a - scr_dump.o
a - scroll.o
a - slk.o
a - termattr.o
a - terminfo.o
a - touch.o
a - util.o
a - window.o
a - debug.o
a - pdcclip.o
a - pdcdisp.o
a - pdcgetsc.o
a - pdckbd.o
a - pdcscrn.o
a - pdcsetsc.o
a - pdcutil.o
xcopy pdcurses.a panel.a
Does panel.a specify a file name
or directory name on the target
(F = file, D = directory)? F
C:pdcurses.a
1 File(s) copied
gcc -O2 -Wall -I.. -otestcurs.exe ../demos/testcurs.c pdcurses.a
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/cc08fFD9.o:testcurs.c:(.text+0x71c): undefine
d reference to `__ctype_ptr'
pdcurses.a(initscr.o):initscr.c:(.text+0xed): undefined reference to `_impure_pt
r'
pdcurses.a(initscr.o):initscr.c:(.text+0x31c): undefined reference to `_impure_p
tr'
pdcurses.a(initscr.o):initscr.c:(.text+0x352): undefined reference to `_impure_p
tr'
pdcurses.a(initscr.o):initscr.c:(.text+0x388): undefined reference to `_impure_p
tr'
pdcurses.a(initscr.o):initscr.c:(.text+0x3be): undefined reference to `_impure_p
tr'
pdcurses.a(pdcscrn.o):pdcscrn.c:(.text+0x802): more undefined references to `_im
pure_ptr' follow
collect2: ld returned 1 exit status
mingw32-make: *** [testcurs.exe] Error 1

Does anyone have any idea what the reason might be and/or how I can fix it and compile pdcurses? Thank in advance.

-Lefteris

+1  A: 

Try replacing copy with xcopy in the Makefile. This might help.

Also, you may look here

EFraim
Thanks for the xcopy, it did work with copying it. About the link you provided what does it mean exactly? I do have cygwin installed, you think it might be messing with mingw? Would I need to uninstall cygwin?
Lefteris
Might be. The problem appears to be that wrong io.h is being included.
EFraim
Yeah you were right! To tell you the truth I don't know what io.h actually is. I did a search for it and saw that it was in two other folders of mine. AVR toolchain and blackfin toolchain.Both are microcontroller toolchains one for the AVR microprocessors and the other for the Blackfin family of processors. I had done a few projects on both and so they were both on the path.I don't know exactly what messed with mingw's io.h but removing those two from the path fixed the problem and compilation of pdcurses happened correctly. Problem is I am not sure 100% why it happened.
Lefteris
Maybe one of those other io.h referenced some symbol related to internal implementation, which surely was not present in your mingw libs.
EFraim