Undefined reference when using ncurses on linux
问题 I'm trying to start developing a program using ncurses on Linux. I can't even get the Hello World example to compile. Here's the code: #include <curses.h> int main() { initscr(); printw("Hello, world."); refresh(); getch(); endwin(); return 0; } When I attempt to compile, I get: hello.c:(.text+0x12): undefined reference to `initscr' For every one of those called functions. I installed ncurses via apt-get, and also by downloading the sources and compiling, installing, etc. I have tried