What's the difference between -lcurses and -lncurses when compiling C using ncurses lib?

后端 未结 4 685
栀梦
栀梦 2020-12-06 19:20

I\'m learning C and playing with the ncurses lib. I have seen references to both -lcurses and -lncurses but I have yet to find any differences (both work when compiling).

4条回答
  •  情歌与酒
    2020-12-06 19:30

    On my system (Slackware64 13.0), libcurses.so and friends are just symbolic links to the ncurses equivalent, so there is no difference. The libcurses.so (-lcurses) name is probably just to provide backwards compatibility with code designed for other systems which have a curses implementation other than ncurses.

提交回复
热议问题