title: Cannot link with Lua library on Linux
body: <p>I've compiled Lua 5.2 on Debian x86-64 with make posix, and am trying to compile the following with the command <code>gcc -ldl -llua main.c</code></p>
  
  <pre><code>#include "lua.h"
  #include "lauxlib.h"
  #include "lualib.h"
  int main() {  
    lua_State *L = luaL_newstate(); 
    luaL_openlibs(L);  
    dofile("test.lua");   
    return 0;
  }
  </code></pre>
  
  <p>and get unresolved references to the lua functions</p>