lua-users home
lua-l archive

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



On Feb 05, 2005, at 14:52, PA wrote:

For the record, I'm using lua-5.1-work4 on Mac OS X 10.3.7.

Ok... I made some progress (?!?) of sort...

I installed LuaSocket files in "./Library/Lua" and the dynamic libraries in "./Library/Modules" and added those two paths to package.path and package.cpath respectively:

package.path = package.path .. ";./Library/Lua/?.lua;"
package.cpath = package.cpath .. ";./Library/Modules/?.dylib;"

However, LuaSocket uses its own requirelib() function, which works in terms of findlib(), which works in terms of LUA_PATHLIB... So I changed findlib() to use package.cpath instead:

    local path = package.cpath

Now, findlib() does find luasocket.dylib, but fails to load it:

./Library/Modules/luasocket.dylib
lua: ./Library/Lua/lua.lua:22: file is not a bundle
stack traceback:
        [C]: in function `assert'
        ./Library/Lua/lua.lua:22: in function `requirelib'
        ./Library/Lua/socket.lua:12: in main chunk
        [C]: in function `require'
        ./Library/Lua/http.lua:11: in main chunk
        [C]: in function `require'
        Example.lua:186: in main chunk
        [C]: ?

What does "file is not a bundle" means? I'm obviously doing something very wrong, but I have no clue how to get this going :/

Any help greatly appreciated!

Thanks :)

Cheers

--
PA, Onnay Equitursay
http://alt.textdrive.com/