lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

2010/3/4 leeya <>:
> But I did not know how to register to Lua so that I was able to use
> LPeg by interactive ways.

require ("lpeg") is what you need to do.  But first you must move onto the Lua extension path.

On Linux, usually it is like so:

$ lua -e "print(package.cpath)"

Which means that you should move to /usr/local/lib/lua/5.1

However, if you are just testing an extension, note the ./?.so: it
means that if you run Lua in the same directory as, then
require should work directly.

steve d.