lua-users home
lua-l archive

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


On Sat, Oct 2, 2010 at 12:00 PM, Frank Meier-Dörnberg <frank@md-web.de> wrote:
> Am 01.10.2010 23:37, schrieb Jorg B. Jorge:
> [...]
> Unfortunately whenever we tried to link the lualib (as dll)
> [...]
>
> Did you consider to compile it yourself and link it statically into your
> project?
> Lua's size and licensing allow it, I believe.
At least on Windows, having Lua as a DLL has some advantages:
* You can swap between a Lua DLL and a LuaJIT DLL without having to
recompile anything.
* You can load other Lua C libraries without having to compile them
into the main app (with Lua compiled statically, other libraries also
need to be compiled statically to avoid multiple instances of the Lua
VM in a process).
* The exports presented by a DLL are a much nicer interface for a 3rd
party debugger to latch onto, compared to optimised internal calls to
a static library.

As to the OP's question, I would recommend throwing
http://www.dependencywalker.com/ at the compiled DLL to see the names
of the exported functions (and to check that things are actually being
exported), and then compare these names to what the compiler is trying
to find. This won't solve the problem, but it may provide information
which does lead to a solution.