Unknown output console error Eclipse

◇◆丶佛笑我妖孽 提交于 2019-12-12 01:45:25

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!