lua-users home
lua-l archive

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

FWIW, the way we solved this in nodeJS is to change the extension to .node and require can only open those and not arbitrary .so files.

On Tue, Sep 13, 2011 at 7:16 PM, David Manura <> wrote:
On Tue, Sep 13, 2011 at 9:56 PM, David Manura <> wrote:
> Keeping Lua modules and regular C libraries in separate
> directories may mitigate naming conflicts, but sometimes it's
> convenient to keep them in the same directory (e.g. see Windows DLL
> path lookup rules).  Other operating systems may use different
> prefixes too (e.g. PREFIX is "cyg" on Cygwin).

And in some cases PREFIX is blank, which leads to problems, even if
you do place the identically named libraries in different directories
[1].  Sometimes I've wondered if it would be better for LUA_CPATH to
default to using some other extension like ".luadll"/".luaso" to avoid
ambiguity in what are distinct namespaces (Lua cpath and system
library path).