编译lua的时候报错头文件找不到:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
[root@centos lua-5.3.4]# make linux test cd src && make linux make[1]: Entering directory `/home/ma/software/lua-5.3.4/src' make all SYSCFLAGS="-DLUA_USE_LINUX" SYSLIBS="-Wl,-E -ldl -lreadline" make[2]: Entering directory `/home/ma/software/lua-5.3.4/src' gcc -std=gnu99 -O2 -Wall -Wextra -DLUA_COMPAT_5_2 -DLUA_USE_LINUX -c -o lua.o lua.c lua.c:82:31: error: readline/readline.h: No such file or directory lua.c:83:30: error: readline/history.h: No such file or directory lua.c: In function ‘pushline’: lua.c:312: warning: implicit declaration of function ‘readline’ lua.c:312: warning: assignment makes pointer from integer without a cast lua.c: In function ‘addreturn’: lua.c:339: warning: implicit declaration of function ‘add_history’ make[2]: *** [lua.o] Error 1 make[2]: Leaving directory `/home/ma/software/lua-5.3.4/src' make[1]: *** [linux] Error 2 make[1]: Leaving directory `/home/ma/software/lua-5.3.4/src' make: *** [linux] Error 2 |
解决方法
1 2 3 4 |
# centos yum install readline-devel # debian apt-get install libreadline-dev. |
评论