I'm trying to embed lua in a c program, but I'm having problems to compile the code. I have installed everything lua 5.2 related in synaptic and when tried to compile this:
extern "C"{
#include <stdio.h>
#include <string.h>
#include "lua5.2/lua.h"
#include "lua5.2/lauxlib.h"
#include "lua5.2/lualib.h"
}
int main(int argc, char* argv[])
{
lua_State *lua_state;
lua_state = luaL_newstate();
lua_close(lua_state);
}
and compile using
g++ main.cpp -llua
show the folowing errors
Could not find -llua
what do?
-L/path/to/lib<stdio.h>nor<string.h>should be wrapped in anextern "C"-block.liblua.soin that directory?