![](http://cynthia.blog.51cto.com/images/editer/InBlock.gif)
tao@tao:~/lua-5.2.0$ gcc -I/usr/local/include/ -L/usr/local/lib/ -lm -DLUA_USE_READLINE a.c /usr/local/lib/liblua.a
![](http://cynthia.blog.51cto.com/images/editer/InBlock.gif)
a.c: 在函数‘main’中:
![](http://cynthia.blog.51cto.com/images/editer/InBlock.gif)
a.c:9:24: 警告: 初始化时将整数赋给指针,未作类型转换 [默认启用]
![](http://cynthia.blog.51cto.com/images/editer/InBlock.gif)
/tmp/ccqm5luQ.o: In function `main':
![](http://cynthia.blog.51cto.com/images/editer/InBlock.gif)
a.c:(.text+0x23): undefined reference to `lua_open'
![](http://cynthia.blog.51cto.com/images/editer/InBlock.gif)
/usr/local/lib/liblua.a(lvm.o): In function `luaV_execute':
![](http://cynthia.blog.51cto.com/images/editer/InBlock.gif)
lvm.c:(.text+0x16d8): undefined reference to `pow'
![](http://cynthia.blog.51cto.com/images/editer/InBlock.gif)
/usr/local/lib/liblua.a(lobject.o): In function `luaO_arith':
![](http://cynthia.blog.51cto.com/images/editer/InBlock.gif)
lobject.c:(.text+0x120): undefined reference to `pow'
![](http://cynthia.blog.51cto.com/images/editer/InBlock.gif)
/usr/local/lib/liblua.a(lmathlib.o): In function `math_tan':
![](http://cynthia.blog.51cto.com/images/editer/InBlock.gif)
lmathlib.c:(.text+0x16c): undefined reference to `tan'
![](http://cynthia.blog.51cto.com/images/editer/InBlock.gif)
/usr/local/lib/liblua.a(lmathlib.o): In function `math_tanh':
![](http://cynthia.blog.51cto.com/images/editer/InBlock.gif)
lmathlib.c:(.text+0x1ac): undefined reference to `tanh'
![](http://cynthia.blog.51cto.com/images/editer/InBlock.gif)
/usr/local/lib/liblua.a(lmathlib.o): In function `math_sqrt':
![](http://cynthia.blog.51cto.com/images/editer/InBlock.gif)
lmathlib.c:(.text+0x20e): undefined reference to `sqrt'
![](http://cynthia.blog.51cto.com/images/editer/InBlock.gif)
/usr/local/lib/liblua.a(lmathlib.o): In function `math_sin':
![](http://cynthia.blog.51cto.com/images/editer/InBlock.gif)
lmathlib.c:(.text+0x23c): undefined reference to `sin'
![](http://cynthia.blog.51cto.com/images/editer/InBlock.gif)
/usr/local/lib/liblua.a(lmathlib.o): In function `math_sinh':
![](http://cynthia.blog.51cto.com/images/editer/InBlock.gif)
lmathlib.c:(.text+0x27c): undefined reference to `sinh'
![](http://cynthia.blog.51cto.com/images/editer/InBlock.gif)
/usr/local/lib/liblua.a(lmathlib.o): In function `math_pow':
![](http://cynthia.blog.51cto.com/images/editer/InBlock.gif)
lmathlib.c:(.text+0x5d8): undefined reference to `pow'
![](http://cynthia.blog.51cto.com/images/editer/InBlock.gif)
/usr/local/lib/liblua.a(lmathlib.o): In function `math_log':
![](http://cynthia.blog.51cto.com/images/editer/InBlock.gif)
lmathlib.c:(.text+0x6ba): undefined reference to `log'
![](http://cynthia.blog.51cto.com/images/editer/InBlock.gif)
lmathlib.c:(.text+0x6ca): undefined reference to `log'
![](http://cynthia.blog.51cto.com/images/editer/InBlock.gif)
lmathlib.c:(.text+0x6ed): undefined reference to `log10'
![](http://cynthia.blog.51cto.com/images/editer/InBlock.gif)
lmathlib.c:(.text+0x700): undefined reference to `log'
![](http://cynthia.blog.51cto.com/images/editer/InBlock.gif)
/usr/local/lib/liblua.a(lmathlib.o): In function `math_log10':
![](http://cynthia.blog.51cto.com/images/editer/InBlock.gif)
lmathlib.c:(.text+0x72c): undefined reference to `log10'
![](http://cynthia.blog.51cto.com/images/editer/InBlock.gif)
/usr/local/lib/liblua.a(lmathlib.o): In function `math_fmod':
![](http://cynthia.blog.51cto.com/images/editer/InBlock.gif)
lmathlib.c:(.text+0x865): undefined reference to `fmod'
![](http://cynthia.blog.51cto.com/images/editer/InBlock.gif)
/usr/local/lib/liblua.a(lmathlib.o): In function `math_exp':
![](http://cynthia.blog.51cto.com/images/editer/InBlock.gif)
lmathlib.c:(.text+0x88c): undefined reference to `exp'
![](http://cynthia.blog.51cto.com/images/editer/InBlock.gif)
/usr/local/lib/liblua.a(lmathlib.o): In function `math_cos':
![](http://cynthia.blog.51cto.com/images/editer/InBlock.gif)
lmathlib.c:(.text+0x8cc): undefined reference to `cos'
![](http://cynthia.blog.51cto.com/images/editer/InBlock.gif)
/usr/local/lib/liblua.a(lmathlib.o): In function `math_cosh':
![](http://cynthia.blog.51cto.com/images/editer/InBlock.gif)
lmathlib.c:(.text+0x90c): undefined reference to `cosh'
![](http://cynthia.blog.51cto.com/images/editer/InBlock.gif)
/usr/local/lib/liblua.a(lmathlib.o): In function `math_atan':
![](http://cynthia.blog.51cto.com/images/editer/InBlock.gif)
lmathlib.c:(.text+0x94c): undefined reference to `atan'
![](http://cynthia.blog.51cto.com/images/editer/InBlock.gif)
/usr/local/lib/liblua.a(lmathlib.o): In function `math_atan2':
![](http://cynthia.blog.51cto.com/images/editer/InBlock.gif)
lmathlib.c:(.text+0x9a8): undefined reference to `atan2'
![](http://cynthia.blog.51cto.com/images/editer/InBlock.gif)
/usr/local/lib/liblua.a(lmathlib.o): In function `math_asin':
![](http://cynthia.blog.51cto.com/images/editer/InBlock.gif)
lmathlib.c:(.text+0x9ec): undefined reference to `asin'
![](http://cynthia.blog.51cto.com/images/editer/InBlock.gif)
/usr/local/lib/liblua.a(lmathlib.o): In function `math_acos':
![](http://cynthia.blog.51cto.com/images/editer/InBlock.gif)
lmathlib.c:(.text+0xa2c): undefined reference to `acos'
![](http://cynthia.blog.51cto.com/images/editer/InBlock.gif)
/usr/local/lib/liblua.a(loadlib.o): In function `ll_loadfunc':
![](http://cynthia.blog.51cto.com/images/editer/InBlock.gif)
loadlib.c:(.text+0x8e9): undefined reference to `dlsym'
![](http://cynthia.blog.51cto.com/images/editer/InBlock.gif)
loadlib.c:(.text+0x950): undefined reference to `dlopen'
![](http://cynthia.blog.51cto.com/images/editer/InBlock.gif)
loadlib.c:(.text+0x981): undefined reference to `dlerror'
![](http://cynthia.blog.51cto.com/images/editer/InBlock.gif)
loadlib.c:(.text+0x9a1): undefined reference to `dlerror'
![](http://cynthia.blog.51cto.com/images/editer/InBlock.gif)
/usr/local/lib/liblua.a(loadlib.o): In function `gctm':
![](http://cynthia.blog.51cto.com/images/editer/InBlock.gif)
loadlib.c:(.text+0xd1c): undefined reference to `dlclose'