On Sep 4, 8:55 pm, Tony Mechelynck <[EMAIL PROTECTED]>
wrote:
> 1. If the interface uses a separate DLL, then the absence of that DLL
> must not prevent Vim from running (as long as the interface isn't used,
> of course).

That's my view.

> 2. If the DLL must be linked with the same C runtime as every program
> with which it is used, there's little advantage in having a separate
> DLL. It might even be outright dangerous to use it.
>
> Therefore I believe that the way to go is to link the Lua interface (if
> enabled) statically into Vim. Or else, maybe, as a DLL of a different
> name, compiled and distributed together with Vim, and installed in
> $VIMRUNTIME; but there might be licensing problems with the latter approach.

The only issue here is that Lua allows loading of extension modules
compiled as DLLs. These need either a Lua DLL to link to (so they use
the same Lua runtime as Vim) or a means to link to a statically linked
runtime within Vim. The latter is possible, but somewhat fiddly.
Disabling loading of DLL extensions is another option, but that's a
bit limiting, in my view.

Note that this is not actually any different from the situation with
Perl, Python, TCL or whatever. It's just that Lua doesn't have a
"default" binary distribution which can be assumed to be in use - the
nearest is the LuaBinaries distribution, which makes an unfortunate
(IMHO) choice of using the msvcr80 C runtime.

I propose the following (which I plan to implement):

1. Compile-time options to link Lua dynamically or statically. The
dynamic link version WILL fail to start if lua51.dll is not present.
But that's OK, as the static build will be the default (and given
point (2) below, should not need to be overridden in normal cases).

2. I will build, test and document a "forwarding DLL" which will allow
a statically linked Lua to load .dll extension modules. This probably
won't need to be distributed with Vim, as it's not in any way Vim-
specific. I'll probably put it on the Lua-users wiki, with a pointer
to the location in Vim's documentation. (The Lua-users wiki already
has a couple of descriptions of how to do this, but I'm hoping I can
provide some clarifications, plus a working binary).

This is all only for Windows (and only for the mingw compiler on
Windows). I don't have any experience of doing this type of thing for
Linux, so I'll leave that alone. Extending this to other Windows
compilers shouldn't be hard, but I don't have the means to build Vim
with anything other than mingw at the moment.

Comments?
Paul.

PS Please note - all I'm doing is some build configuration. All the
credit for the Lua interface remains with Luis, who certainly has my
gratitude for developing the patch.
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Raspunde prin e-mail lui