[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: RE: Path change to LUA_CPATH in Lua Binaries
- From: "Antonio Scuri" <scuri@...>
- Date: Thu, 28 Aug 2008 13:13:04 -0300
Here is an example of LoadLibrary effects:
I changed the default LUA_CPATH to:
#define LUA_CPATH_DEFAULT \
".\\?.dll;" ".\\?51.dll;" LUA_CDIR"?.dll;" LUA_CDIR"?51.dll;"
LUA_CDIR"clibs\\?.dll;" LUA_CDIR"clibs\\?51.dll;" LUA_CDIR"loadall.dll;"
LUA_CDIR"clibs\\loadall.dll"
I tested using IUP. The Lua binding is "iuplua51.dll" that depends on
"iup.dll". The test code does require"iuplua".
Then if I move the dlls to the "clibs" folder then it fails to load the
module. Because "iup.dll" is not found by the system when it tries to load
"iuplua51.dll", even if they are in the same folder. This happens because
the standard search path includes only the executable folder, nor the folder
of loaded DLLs.
When using LoadLibraryEx with the flag LOAD_WITH_ALTERED_SEARCH_PATH, then
it successfully loads "iuplua51.dll" and with no change to the PATH
environment.
I intend to release LuaBinaries for Lua 5.1.4 with the above LUA_CPATH.
But with no changes to the loadlib behavior.
Let me know what you think.
Best,
Scuri