title: calling c code from lua
body: <p>I tried to follow this: <a href="http://www.troubleshooters.com/codecorn/lua/lua_lua_calls_c.htm" rel="nofollow">http://www.troubleshooters.com/codecorn/lua/lua_lua_calls_c.htm</a> </p>
  
  <p>I tried to compile the c code like it says in the guide:</p>
  
  <p><code>gcc -Wall -shared -fPIC -o power.so  -I/usr/include/lua5.1 -llua5.1  hellofunc.c</code></p>
  
  <p>but I got <a href="http://pastebin.com/KQvA0qFH" rel="nofollow">http://pastebin.com/KQvA0qFH</a> which I recognized as the error you get when you forget to include a lib or framework but I did -I/usr/include/lua5.1</p>
  
  <p>If it matters I am running os x and I installed lua with brew</p>