mac os 10.9及unix/linux 64位编译curses函数失败

来源:互联网 发布:农业国家数据库查询 编辑:程序博客网 时间:2024/05/19 18:44

错误提示

Undefined symbols for architecture x86_64:  "_cbreak", referenced from:      _main in bounceld-Pf86fR.o  "_endwin", referenced from:      _main in bounceld-Pf86fR.o  "_initscr", referenced from:      _main in bounceld-Pf86fR.o  "_stdscr", referenced from:      _main in bounceld-Pf86fR.o      _move_mesg in bounceld-Pf86fR.o  "_waddnstr", referenced from:      _main in bounceld-Pf86fR.o      _move_mesg in bounceld-Pf86fR.o  "_wclear", referenced from:      _main in bounceld-Pf86fR.o  "_wgetch", referenced from:      _main in bounceld-Pf86fR.o  "_wmove", referenced from:      _main in bounceld-Pf86fR.o      _move_mesg in bounceld-Pf86fR.o  "_wrefresh", referenced from:      _move_mesg in bounceld-Pf86fR.old: symbol(s) not found for architecture x86_64clang: error: linker command failed with exit code 1 (use -v to see invocation)

解决方法

在编译参数后加上-lncurses

0 0
原创粉丝点击