I'm using CLion 2018.2.6 on MacOS. I'm trying to use ncurses but getting the error "Error opening terminal: unknown." I'm not sure how to fix this. Any help appreciated. Code below.
#include <iostream>
#include <ncurses.h>
using namespace std;
int main(){
initscr();
clear();
printw("Seems legit!");
refresh();
getch();
endwin();
}
Check the path of terminfo folder in the application running system and the same path in your application like this,
Ex:- setenv("TERMINFO","/usr/share/terminfo", 1);
It working.