Statically link ncurses to program
I'm having some problems statically linking ncurses to one of my programs Here's a really simple sample program: #include<ncurses.h> int main(){ initscr(); printw("Hello world\n"); refresh(); getch(); endwin(); return 0; } When I compile it with gcc -static -lncurses hello_curses.c -o curses I get these errors: /tmp/ccwHJ6o1.o: In function `main': curses_hello.c:(.text+0x5): undefined reference to `initscr' curses_hello.c:(.text+0x14): undefined reference to `printw' curses_hello.c:(.text+0x1b): undefined reference to `stdscr' curses_hello.c:(.text+0x20): undefined reference to `wrefresh'