lua-users home
lua-l archive

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


Thanks, Andre and Javier, for your help.

Since I didn't want to compile something (for 5.1), 
I tried the tip concerning Lua 5.0.

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.
Now this minimal example works:

    f = loadlib("lfs.dll","luaopen_lfs")
    lfs = f();
    for file in lfs.dir(path) do
        print(file)
    end

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.
Anyway: thanks!

Christof