Hello all,
I am making a very simple platform independent(at least that's the plan) console app. I changed from conio.h to pdCurses to make it happen. The problem with that is that in Windows, using Codeblocks and gcc I have a problem.
When I include I get tons of errors. They all concern 3 macros all located in different source files inside:
CodeBlocks\MinGW\bin..\lib\gcc\mingw32\3.4.5........\include\c++\3.4.5\bits\
If I undef those 3 macros like this:
#include <curses.h>
#undef move
#undef erase
#undef clear
then all compiles well. If I don't undef then I get tons of errors about these macros.
Example errors are:
macro "move" passed 3 arguments, but takes just 2|
\bits\char_traits.h|185|error: invalid function declaration|
\bits\basic_string.h|604|error: expected `)' before '->' token|
\bits\basic_string.h|1039|macro "erase" passed 2 arguments, but takes just 0|
Anyone has any idea why this happens? And any not so damn ugly way to correct the problem? Thanks in advance for your input.
Edit: I am also getting undefined references to various things whenever I invoke any pdcurses functions. I can not understand why. I definitely linked the library correctly. For example by trying to echo a char on the screen I get:
main.cpp|74|undefined reference to __imp__SP'|
main.cpp|74|undefined reference to
__imp__stdscr'|
main.cpp|74|undefined reference to `__imp__stdscr'|
Can it be anything other than bad linking of the library? And how can I see what's wrong with the linking of pdcurses fromthe above errors?
-Lefteris