0
#include <ncurses.h>

int main()
{
    initscr();

    addstr("Hello world");
    refresh();
    getch();
    endwin();
    return 0;
}

This basic application doesn't show any output when building and running in QtCreator 2.8.0.

When i run previously compiled in QtCreator program in separate terminal window, then it works fine. But when i run it under QtCreator (Ctrl-R or press "Run" button), then i see empty xterm window and no output. I guess this is somehow related with qtcreator_process_stub, which entitles that empty xterm window.

4

2 回答 2

0

尝试更换

addstr("Hello world");

printw("Hello World !!!");

于 2013-08-26T16:49:13.620 回答
0

找到了解决方案。

在项目设置-> 环境-> TERM变量中应设置为正常值,如xterm

默认情况下,它设置为dumb

于 2013-08-27T06:18:30.957 回答