出错信息如下:
hy@hy-laptop:~$ gcc -o curses curses.c
curses.c: In function ‘main’:
curses.c:15: warning: incompatible implicit declaration of built-in function ‘exit’
/tmp/cc6Ldbmz.o: In function `main':
curses.c.text+0x12): undefined reference to `initscr'
curses.c.text+0x17): undefined reference to `stdscr'
curses.c.text+0x2f): undefined reference to `wmove'
curses.c.text+0x43): undefined reference to `printw'
curses.c.text+0x4: undefined reference to `stdscr'
curses.c.text+0x50): undefined reference to `wrefresh'
curses.c.text+0x61): undefined reference to `endwin'
collect2: ld returned 1 exit status
libncursesw5 The ncurses shared libraries, with wide character
support
libncursesw5-dev Development environment for libncursesw5
libncursesw5-dbg Debugging libraries for libncursesw5
ncurses-bin Various small applications (clear, reset, tic, etc.)
ncurses-base Standard terminal entries
ncurses-term All the rest of the terminal entries作者: cccccc 时间: 2007-10-11 10:09
gcc -o curses curses.c -lcurses 这样就可以了作者: weiqiboy 时间: 2007-10-11 10:20
确实如此,谢谢。