[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: How to avoid DLL hell?
- From: Axel Kittenberger <axkibe@...>
- Date: Fri, 26 Nov 2010 10:22:31 +0100
>> One possible solution would be to suggest, strongly suggest, that in future the precompiled binary DLLs all include the Lua version number in them. Eg. luasocket.5.2.dll, luacom.5.2.dll, and so on. Then luasocket.5.2.dll can be linked against lua.5.2.dll, and so on.
>
> But is this necessary? I would totally agree that the binary packages
> should be labeled carefully, but it's a matter of keeping different
> Lua installations separate. Your application will have its own Lua
> module paths - Lua for Windows does define LUA_PATH but it's just for
> .luac files and it does not define LUA_CPATH.
I agree, additionally naming all dll binaries after the LUA version
only isnt solving anything. First if i would put a version number
there, it would be the version of the luasocket library, not the lua
it was linked against. Since maybe you want something to have in
luasocket 2.0.2 only or there might be incompatibilities with
luasocket 2.0.0 etc. Second what if a Library needs another library,
do you code their version number into name too? Just a makeup:
mylib1.2.2-needs-luaposix-2.1-needs-luasocket-2.0.2-islua-5.1.dll?
Third even if doin that it doesnt even solve anything, since you can
tell from the name if said library was linked with against cygwin or
against mingw or msvc.
I'm not dissing windows right away, infact I'm writing this email on
one :-) But DLL hell is something where they failed, and I've not yet
seen MS coming up with a real solution. The principle problem is IMHO
there are no package dependencies on windwos like e.g. all linux
distros have. Coping with the problem is as said, have at least an
installer that comes with libraries *you* need. Second have
instructions what libraries must be linked against users want to
require or a list of optional libraries you can recommend, which are
linked matching your application. Otherwise its an installation
problem of the user.
The only thing that maybe can be achieved is linker errors right away
if there are version conflicts instead of crashes.