Why is curses on linux giving me following error?
问题 Trying to get getch() working to capture key press. #include <curses.h> ... ... WINDOW *w; char f; w = initscr(); timeout(3000); f = getch(); endwin(); is giving me following error:- undefined reference to `wgetch' undefined reference to `stdscr' 回答1: That's a linking error. Are you linking to the curses library correctly? There are two steps involved in using a library in C. You #include the relevant header files from your source files. This is so your code knows what signatures of the