lua-users home
lua-l archive

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

> Christof Schardt wrote:
> Finally I succeded after googling for "loadlib" and "lfs".
> The key was this code:
>    f = loadlib("lfs.dll","luaopen_lfs")
>    lfs = f();
> Additionally I had to copy lua50.dll to my PATH, otherwise
> the interpreter complained.
> ...
> I wonder, where I could have found that information directly
> instead of try-and-error-ing one wohle day. Without that
> googled snippet I wouldn't habe been able to succeed.

The loading of modules (DLL or not) is usually done with require(), and when using Lua 5.0 a reasonable option is to use Compat-5.1. Compat offers to Lua 5.0 the "module system" of Lua 5.1 where things are usually easier to do both from the loading point of view and from the module integration aspect.

You can read more about compat use on