User forums > Help
Pdcurses
(1/1)
Dark_Oppressor:
I am attempting to write a roguelike(maybe not the best way to learn c++, oh well), and have decided I want to use pdcurses to that end. How would I go about setting up Codeblocks and pdcurses so that I can use it? I have attempted to set it up with the compiler I am currently using(GCC), but I am unable to compile and run any of the demo programs that come with pdcurses. Does pdcurses itself have to be compiled first?
Biplab:
Pdcurses 3.0 comes with source only. But compilation is easy.
1. Download the source and extract it to a folder. Then issue the following command at command prompt:
--- Code: ---set PDCURSES_SRCDIR=<pdcurse_source>
--- End code ---
2. Change directory to <pdcurse_source>\win32 directory. Now, depending upon your choice of compiler, issue a command to compile. I'm using MSVC and I've used:
--- Code: ---nmake -f vcwin32.mak
--- End code ---
For MinGW (GCC) type,
--- Code: ---mingw32-make -f mingwin32.mak
--- End code ---
It will compile your the pdcurse and samples.
To create app follow the steps (I've tested with MSVC 7.1)
a) Create a Console app.
b) Remove the auto-generated file and add a file from demo directory of pdcurse.
c) Add panel.lib, pdcurses.lib, user32.lib and advapi32.lib to it.
d) Add the directories pointing curses.h, pdcwin.h and libraries to Project.
Now it should compile.
Regards,
Biplab
Dark_Oppressor:
Ok, apparently you can't just install mingw, you have to manually do quite a few things before it will work. I have setup its bin directory in my PATH, and it will finally start trying to compile something, but I always get an error such as this:
C:\pdcurses\win32>mingw32-make -f mingwin32.mak
gcc -c -O2 -Wall -IC:\pdcurses C:\pdcurses/pdcurses/addch.c
gcc: installation problem, cannot exec `cc1': No such file or directory
mingw32-make: *** [addch.o] Error 1
I believe this is a problem with the compiler, because I also tried using g++ to compile a program of mine that I know is fine, and I get this:
g++: installation problem, cannot exec `cc1plus': No such file or directory
TDragon:
--- Quote from: Dark_Oppressor on April 03, 2007, 09:16:19 pm ---..., but I always get an error such as this:
...
gcc: installation problem, cannot exec `cc1': No such file or directory
...
g++: installation problem, cannot exec `cc1plus': No such file or directory
--- End quote ---
These errors are one of the symptoms of trying to use MinGW on Windows Vista; are you? If so, a search on the C::B forums (or elsewhere) will turn up some workarounds.
If not, generally the best thing to do is totally delete everything and reinstall from scratch.
Dark_Oppressor:
Nope, I'm on XP. I'll try reinstalling in a bit, but I just installed Mingw a few days ago in the first place.
Navigation
[0] Message Index
Go to full version