[Home] [Downloads] [Search] [Help/forum]


Register forum user name Search FAQ

Gammon Forum

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  Suggestions
. . -> [Subject]  Library DLLs in 4.60+

Library DLLs in 4.60+

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page


Posted by WillFa   USA  (525 posts)  [Biography] bio
Date Wed 01 Sep 2010 06:32 AM (UTC)
Message
Would it be possible to have Luacom, luasocket, et al. in a separate directory than the lua directory, and Mushclient set package.cpath to be %LUA_CPATH%;<MCInstallDir>\Lua\clibs?

I already have Lua for Windows installed, and have most if not all of these dlls. I don't want to run into DLL hell because versioning issues.

[Go to top] top

Posted by Nick Gammon   Australia  (22,975 posts)  [Biography] bio   Forum Administrator
Date Reply #1 on Wed 01 Sep 2010 06:45 AM (UTC)
Message
Well I don't really want to fiddle with the Lua package.cpath if I can help it, because there could be other side-effects.

Where do you have yours installed? Will they necessarily clash?

In any case, you can set the package.cpath in your Lua sandbox, which is a once-off change to affect all your scripts.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Nick Gammon   Australia  (22,975 posts)  [Biography] bio   Forum Administrator
Date Reply #2 on Wed 01 Sep 2010 06:51 AM (UTC)
Message
In any case I think we are already in DLL hell, frankly.

For one thing, some of the Lua libraries load against lua5.1.dll and others against lua51.dll. They have worked around that a bit, I believe, by releasing a "stub" DLL that redirects from one to the other (I forget which the "real" one is).

I found a while back that downloading some of the LuaBinaries files and trying to run them is indeed a special form of hell.

That is one of the reasons I am distributing my own copies, which are basically compiled from the original source, but at least linked against the "right" libraries to run with MUSHclient (eg. not against Cygwin).

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by WillFa   USA  (525 posts)  [Biography] bio
Date Reply #3 on Wed 01 Sep 2010 07:38 AM (UTC)

Amended on Wed 01 Sep 2010 07:40 AM (UTC) by WillFa

Message
I have LfW (Lua for Windows) installed to C:\Lua\5.1 . I manually set a system environment variable LUA_CPATH to C:\Lua\5.1\clibs\?.dll;

[Go to top] top

Posted by Twisol   USA  (2,257 posts)  [Biography] bio
Date Reply #4 on Wed 01 Sep 2010 07:41 AM (UTC)
Message
I would have to agree with Nick here, the sandbox code is almost certainly the best place to set the cpath.

'Soludra' on Achaea

Blog: http://jonathan.com/
GitHub: http://github.com/Twisol
[Go to top] top

Posted by WillFa   USA  (525 posts)  [Biography] bio
Date Reply #5 on Wed 01 Sep 2010 08:01 AM (UTC)
Message
Nick Gammon said:

In any case I think we are already in DLL hell, frankly.

For one thing, some of the Lua libraries load against lua5.1.dll and others against lua51.dll. They have worked around that a bit, I believe, by releasing a "stub" DLL that redirects from one to the other (I forget which the "real" one is).
...


lua5.1.dll is the real one.
lua51.dll is the stub (since we're not at version 51 yet)
[Go to top] top

Posted by Nick Gammon   Australia  (22,975 posts)  [Biography] bio   Forum Administrator
Date Reply #6 on Wed 01 Sep 2010 10:54 AM (UTC)
Message
Funny you should say that. I raised this issue in 2008 on the Lua mailing list and got told:

Mike Pall said:

The standard DLL name "lua51.dll" has been selected more than three years ago. Around twice every year someone comes along and thinks "Oh, we absolutely need a dot in the DLL version number".


and:

Thomas Lauer said:

As Mike wrote, the "standard naming convention", insofar as there is one, is to have the version number w/o dots or other embellishments.


Rightly or wrongly (personally I like the dot, since, as you say, it isn't Lua version 51), the issue hasn't really been resolved, and indeed people are prepared to argue both sides of the case.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


19,226 views.

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at HostDash]