美文网首页
readline报错

readline报错

作者: 华山论剑 | 来源:发表于2017-09-02 01:36 被阅读76次

    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选项,可编译通过

    相关文章

      网友评论

          本文标题:readline报错

          本文链接:https://www.haomeiwen.com/subject/vbjljxtx.html