Chu
Chu

Reputation: 478

QtCreator and ncurses

I have a little program with C++ and ncurses in QtCreator:

#include <ncurses.h>

int main()
{
       initscr();// inicializa pantalla
       printw("Hello world!");
       refresh();
       getch();
       endwin();
}

but when is opened xterm, it says: Error opening terminal:unknown

It occured in Eclipse...

I've installed ncurses library correctly.

I run my code from console right.

Upvotes: 1

Views: 2138

Answers (1)

Chu
Chu

Reputation: 478

On the Projects tab, Targets, Desktop, Run, Run Environment. Look for the TERM variable. If no found, add it and on the value of it, write xterm

Upvotes: 4

Related Questions