Lua-5.2.2在redhat Linux平台编译失败解决
来源:互联网 发布:文件一机一码加密软件 编辑:程序博客网 时间:2024/05/17 16:43
来自: http://guiquanz.github.io/2013/04/29/lua-5.2.2-compiling-error/
lua@home> make linux ...gcc -O2 -Wall -DLUA_COMPAT_ALL -DLUA_USE_LINUX -c -o lstrlib.o lstrlib.cgcc -O2 -Wall -DLUA_COMPAT_ALL -DLUA_USE_LINUX -c -o ltablib.o ltablib.cgcc -O2 -Wall -DLUA_COMPAT_ALL -DLUA_USE_LINUX -c -o loadlib.o loadlib.cgcc -O2 -Wall -DLUA_COMPAT_ALL -DLUA_USE_LINUX -c -o linit.o linit.car rcu liblua.a lapi.o lcode.o lctype.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o lmem.o lobject.o lopcodes.o lparser.o lstate.o lstring.o ltable.o ltm.o lundump.o lvm.o lzio.o lauxlib.o lbaselib.o lbitlib.o lcorolib.o ldblib.o liolib.o lmathlib.o loslib.o lstrlib.o ltablib.o loadlib.o linit.o ranlib liblua.agcc -O2 -Wall -DLUA_COMPAT_ALL -DLUA_USE_LINUX -c -o lua.o lua.cgcc -o lua lua.o liblua.a -lm -Wl,-E -ldl -lreadline /usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64/libreadline.so: undefined reference to `PC'/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64/libreadline.so: undefined reference to `tgetflag'/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64/libreadline.so: undefined reference to `tgetent'/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64/libreadline.so: undefined reference to `UP'/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64/libreadline.so: undefined reference to `tputs'/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64/libreadline.so: undefined reference to `tgoto'/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64/libreadline.so: undefined reference to `tgetnum'/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64/libreadline.so: undefined reference to `BC'/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64/libreadline.so: undefined reference to `tgetstr'collect2: ld returned 1 exit statusmake[1]: *** [lua] Error 1make[1]: Leaving directory `/home/lua/lua-5.2.2/src'make: *** [linux] Error 2
由于lua编译依赖readline
库,而其依赖ncurses
库,但没有指定,所以出现“未定义的符合引用”错误。需要修改${LUA_DIR}/src/Makefile
中linux编译target,在SYSLIBS变量中追加‘-lncurses’选项即可。修改后,如下:
- linux:
- $(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_LINUX" SYSLIBS="-Wl,-E -ldl -lreadline -lncurses"
- Lua-5.2.2在redhat Linux平台编译失败解决
- 编译linux下的lua程序失败
- 解决Xcode库lib在generic iOS devices平台上编译失败的问题
- vlc在Redhat linux ES3下编译
- lua c在linux下的编译
- 在Redhat Linux 9平台下SkyEye试用手记
- 在 redhat 上编译
- 在redhat linux 9上交叉编译sqlite-3.3.6
- 在Redhat Linux 9中编译和配置gvim 7.0
- 在Redhat Linux 9中编译和配置gvim 7.0
- 在RedHat Linux上编译mongodb c++ driver
- 在Redhat Linux 9中编译和配置gvim 7.0
- 在Redhat 4 Linux上编译内核-少波作品
- 在Redhat Linux 9中编译和配置gvim 7.0
- Lua编译安装(MAC平台)
- webkit在linux平台下的编译
- freetype在Linux平台编译小记
- ffmpeg在linux平台下的编译
- C++ STL — 第6章 STL容器(一)vector
- 二分法
- eclipse 下没有android SDK and AVD Manager选项
- 生产者消费者程序
- CSS3 选择器
- Lua-5.2.2在redhat Linux平台编译失败解决
- eclipse adt离线安装
- visualAssist 安装forvs2012
- css权威指南学习之结构和层叠
- Viojs P1495 笨小猴
- 南阳理工OJ_Fibonacci数
- Comet:基于 HTTP 长连接的“服务器推”技术
- Max_connect_errors – MySQL性能参数详解
- 介绍一下关于jsp的web应用模块相关知识。