g++ cannot find lua.h [SOLVED]

Need help with C, C++, perl, python, etc?

g++ cannot find lua.h [SOLVED]

Postby Magnusmaster » 2015-07-16 00:50

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"
}
Magnusmaster
 
Posts: 168
Joined: 2010-06-12 22:50

Return to Programming

Who is online

Users browsing this forum: No registered users and 3 guests

fashionable