【发布时间】:2018-11-24 05:17:18
【问题描述】:
我在 MacOS 上使用 CLion 2018.2.6。我正在尝试使用 ncurses,但收到错误“打开终端时出错:未知”。我不知道如何解决这个问题。任何帮助表示赞赏。代码如下。
#include <iostream>
#include <ncurses.h>
using namespace std;
int main(){
initscr();
clear();
printw("Seems legit!");
refresh();
getch();
endwin();
}
【问题讨论】:
-
您收到该错误是因为环境变量
term未在 CLions 控制台中设置。 How to properly set environment variable TERM in CLion 可能会有所帮助。