tech-pkg archive

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

Re: Lua modules with differing extensions



On 2016-08-22 11:57, Sevan / Venture37 wrote:
On OS X some Lua modules end up with a .dylib extension, by default
Lua only looks for modules with .so extension in its search path. Can
Lua be set to accommodate native shared library file extensions?

For the lua code that I run on both NetBSD and OS X I set something like this before I do much else:

  package.cpath = package.cpath .. ";/path/to/osx/modules/?.dylib"

It's harmless on NetBSD but allows modules to be picked up on OS X.
I believe one can also set this with LUA_INIT or LUA_CPATH but I
prefer the above approach as less effort is required to run the
scripts elsewhere.

I'm not sure if this is at all helpful but I too would like to
know of a cleaner solution, if anyone knows one.

- Travis


Home | Main Index | Thread Index | Old Index