CentOS 编译lua时readline报错

centos下用gcc-4.9.2编译lua时,显示readline链接错误

/usr/lib/../lib64/libreadline.so: undefined reference to `PC'
/usr/lib/../lib64/libreadline.so: undefined reference to `tgetflag'
/usr/lib/../lib64/libreadline.so: undefined reference to `tgetent'
/usr/lib/../lib64/libreadline.so: undefined reference to `UP'
/usr/lib/../lib64/libreadline.so: undefined reference to `tputs'
/usr/lib/../lib64/libreadline.so: undefined reference to `tgoto'
/usr/lib/../lib64/libreadline.so: undefined reference to `tgetnum'
/usr/lib/../lib64/libreadline.so: undefined reference to `BC'
/usr/lib/../lib64/libreadline.so: undefined reference to `tgetstr'
collect2: error: ld returned 1 exit status

ld时加上-lncurses选项,可编译通过

你可能感兴趣的:(CentOS 编译lua时readline报错)