未知的输出控制台错误Eclipse [英] Unknown output console error Eclipse

查看:166
本文介绍了未知的输出控制台错误Eclipse的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将PDCurses库添加到eclipse中,当我运行我的程序时,此消息出现不支持重定向。

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;

 }

推荐答案

您正在尝试使用Win32控制台版本的PDCurses,但是您没有实际的控制台窗口(即Windows调用控制台;有些人称为DOS窗口)来运行它 - 显然,Eclipse正试图将stdin,stdout和stderr从程序转到自己的控制台窗口。这将适用于简单的stdio内容,但PDCurses会在较低的级别操纵控制台,因此无法以其他方式重定向I / O。

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不知道是否有解决方案,除了手动打开系统控制台窗口并从命令行调用程序。

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.

这篇关于未知的输出控制台错误Eclipse的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆