4
votes

I am building a C++ application that embeds the Lua scripting engine. I am developing on Linux (Ubuntu).

I have already installed Lua on my dev machine (by imstalling the lua5.1 package). I can run the Lua intepreter succesfully (via the cmd line).

However, when building, I get the following link error:

/usr/bin/ld: cannot find -llua5.1

I have searched the Ubuntu forums/package repositories etc but I cannot seem to find the required package. Can anyone help?

PS: I also need to install the development files for tolua++ (I'm not sure which Ubuntu package is the required one either).

I am on Ubuntu 10.0.4

3

3 Answers

10
votes

Install the liblua5.1-dev package, and if that does not work compile Lua from sources.

Or you can try -llua instead of -llua5.1.

2
votes

on Fedora 17 problem fixed:

sudo ln /usr/lib/liblua-5.1.so /usr/lib/liblua5.1.so
0
votes

For tolua++, it looks like libtolua++5.1-dev is the package you want.