问题
I added PDCurses library to eclipse and when i run my program this message appears Redirection is not supported.
Here is a simple code but i don't believe that this is an error from my code. No warnings no errors, just this message in Console
#include <stdio.h>
#include <curses.h>
int main()
{
initscr();
printw("Hello World Curses");
refresh();
getch();
endwin();
return 0;
}
回答1:
You're trying to use the Win32 console version of PDCurses, but you don't have an actual console window (i.e. what Windows calls a console; what some people call a DOS window) to run it in -- apparently, Eclipse is trying to redirect stdin, stdout and stderr from the program to its own "console" window instead. This would work for simple stdio stuff, but PDCurses manipulates the console at a lower level -- so it can't have its I/O redirected in that way.
I don't know if there's a solution for you, besides manually opening a system console window and invoking your program from the command line.
来源:https://stackoverflow.com/questions/22366869/unknown-output-console-error-eclipse