Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

g++ cannot find lua.h [SOLVED]

Programming languages, Coding, Executables, Package Creation, and Scripting.
Post Reply
Message
Author
Magnusmaster
Posts: 168
Joined: 2010-06-12 22:50

g++ cannot find lua.h [SOLVED]

#1 Post by Magnusmaster »

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"
}

Post Reply