Undefined reference to `stdscr’ while using ncurses

I was having this problem with an ncurses program on Centos 6.2. It turns out that ncurses is sometimes split into two libraries, ncurses and tinfo. In my case, stdscr exists in libtinfo, not in libncurses, so adding -ltinfo to the link line, after -lncurses, solved the problem.

Leave a Comment