lua-users home
lua-l archive

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

2010/3/5 leeya <>:
> Thank your very much! It should be what you pointed out. So this issue
> should close now.
> Regarding LUA_CPATH issue, have any comments?

This works for me:

$ export LUA_CPATH=';;/home/sdonovan/lua/clibs/?.so'

Note the double-semicolon, this is important; this is replaced by the
system module cpath. When in doubt, print(package.cpath) from Lua
afterwards will tell you exactly where it is looking for your .sos

As an interesting alternative, any changes to package.cpath are also
recognized, so you could have this:

package.cpath = package.cpath .. ';/home/sdonovan/lua/clibs/?.so'
require 'lpeg'

(It's a single semi-colon because we have built the whole path explicitly)

steve d.