I am trying to make a c++ program that reads a lua script. I included the lua libraries like this:
Code: Select all
extern "C" {
#include "lua.h"
#include "lauxlib.h"
#include "lualib.h"
}
But g++ cannot find lua.h, despite having the liblua5.1-0-dev package installed. I tried using the -llua and -llua5.1 flags to no avail. Can anyone help me so I can compile this? Thanks.
EDIT: never mind, I managed to fix the issue by changing the include to:
Code: Select all
extern "C" {
#include "lua5.1/lua.h"
#include "lua5.1/lauxlib.h"
#include "lua5.1/lualib.h"
}