[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: How to register lpeg.so to Lua ?
- From: leeya <leeyacn@...>
- Date: Fri, 5 Mar 2010 20:07:06 +0800 (CST)
It's so clear. I got it. Thank you very much!
在2010-03-05 19:50:26,"steve donovan" <steve.j.donovan@gmail.com> 写道:
>2010/3/5 leeya <leeyacn@126.com>:
>> 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.