Recently I installed PDCurses 3.6 (latest version) on my HP Pavilion laptop with Windows 7 Home Premium. Also I have installed MinGW-w64 (latest version too).
Well, I started to learn how to use the curses mode here, and downloaded their example codes (ncurses_programs.tar.gz); at this point all was OK. After unzipping the programs, I wanted to make use of the Makefile to have all the .exes already made. Here is the problem.
I ran cmd.exe, moved to the folder where the programs are, and then typed mingw32-make -f Makefile
. This is the following process:
mingw32-make[1]: Entering directory 'C:/.../ncurses_programs/JustForFun'
gcc -o hanoi.o -c hanoi.c
/* throws some warnings */
gcc -o ../demo/exe/hanoi hanoi.o -lncurses
C:/MinGW/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64w64-mingw32/bin/ld.exe: cannot find -lncurses
collect2.exe: error: ld returned 1 exit status
mingw32-make[1]: *** [Makefile:20: ../demo/exe/hanoi] Error 1
rm hanoi.o
mingw32-make[1]: Leaving directory 'C:/.../ncurses_programs/JustForFun'
mingw32-make: *** [Makefile:4: all] Error 2
Well, you surely are thinking "man, it's trying to link ncurses and you have pdcurses because you are on Windows". Yes, I know it. That's why I edited the Makefile, typing LIBS=-lpdcurses
instead LIBS=-lncurses
, but it doesn't find it neither.
I know where pdcurses.a
is, so I tried to compile a simple program (print 'Hello World!') by console like this:
gcc -LC:\PDCurses\wincon -lpdcurses -o myprogram myprogram.c
I still getting:
C:/MinGW/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lpdcurses
collect2.exe: error: ld returned 1 exit status
I don't know what else can I do...
Thank you beforehand!