lua-users home
lua-l archive

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

n Tue, Sep 13, 2011 at 11:39 AM, Sebastien Lai <> wrote:
> You can remove the 'lib' prefix this way:

When building a Lua module, I recommend adding MODULE rather than
SHARED to the add_library command.  I believe that also takes care of
omitting the PREFIX as a side-effect.

Modules loaded via Lua require should by convention not have the "lib"
prefix to avoid name conflicts with regular shared libraries not
intended to be loaded via require.  For example, require "foo" might
load from in the package.cpath and in turn might itself be a
Lua wrapper around a regular C library "" in the OS library
path.  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).