linux下编译lua
curl -R -O http://www.lua.org/ftp/lua-5.2.3.tar.gz
编译代码时,遇到如下错误
/usr/lib/libreadline.so: undefined reference to `tgetnum' : /usr/lib/libreadline.so: undefined reference to `tgoto' : /usr/lib/libreadline.so: undefined reference to `tgetflag' : /usr/lib/libreadline.so: undefined reference to `BC' : /usr/lib/libreadline.so: undefined reference to `tputs' : /usr/lib/libreadline.so: undefined reference to `PC' : /usr/lib/libreadline.so: undefined reference to `tgetent' : /usr/lib/libreadline.so: undefined reference to `UP' : /usr/lib/libreadline.so: undefined reference to `tgetstr'
参考 《LINUX readline 库的使用》,这是由于 编译代码时必须链接libreadline 与libtermcap