I'm trying to compile a simple example of C code that includes Lua(5.2) libraries. I'm using the following command:
gcc graph.c -o graph -I/usr/local/include -L/usr/local/lib -llua
And getting the following errors:
/usr/local/lib/liblua.a(lobject.o): In function `luaO_arith':
lobject.c:(.text+0x15c): undefined reference to `floor'
lobject.c:(.text+0x111): undefined reference to `pow'
/usr/local/lib/liblua.a(lvm.o): In function `luaV_execute':
lvm.c:(.text+0x24e9): undefined reference to `floor'
lvm.c:(.text+0x25fe): undefined reference to `pow'
...
Looks like the math library is not linked, but not sure how to fix it... Any suggestions? I installed Lua following instructions from the Readme with make linux and install linux (have Ubuntu 12.04). Thanks!