lua-users home
lua-l archive

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


I still think LUA_CDIR should not be the same as
the interpreter directory.
like i suggested it should be a sub directory of
the lua interpreter's directory.

#define LUA_CDIR        "!\\lib"

and LUA_CPATH_DEFAULT can be something like this

#define LUA_CPATH_DEFAULT ".\\?.dll;" 
"!\\?.dll;" LUA_CDIR"?.dll;" "?.dll"

so if Lua will look for library name "module" it
will search for the file in the following
sequence:

1)".\module.dll" -- in the current directory
2)"PathToLuaExecDir\module.dll" -- in the lua
interpreter directory
3)"PathToLuaExecDir\lib\module.dll" -- in the lua
c-library directory
4)"module.dll" -- Windows Dynamic-Link Library
Search Order (the last resort!).

LoadLibrary performance is not an issue here.
Because you will only load a module once rigth!.

And i'am still wondering why is there a
'LUA_CDIR"loadall.dll"' in the LUA_CPATH_DEFAULT


	
		
__________________________________ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com