lua-users home
lua-l archive

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


On Mon, Mar 11, 2013 at 5:50 PM, steve donovan
<steve.j.donovan@gmail.com> wrote:
> On Mon, Mar 11, 2013 at 6:59 AM, Choonster TheMage
> <choonster.2010@gmail.com> wrote:
>> error loading module 'lua-zlib' from file
>> 'C:\Lua\LuaJIT_2.0\clibs\lua-zlib.dll':
>>         The specified procedure could not be found.
>
> What's happening here (most probably) is that the luaopen_* function
> has not been exported from the DLL; quick fix is to use
> __declspec(dllexport) on that function, or write a little .def file.
>
> MSVC comes with a command-line tool dumpbin; dumpbin /exports my.dll
> will tell you exactly what's exported.
>
> steve d.
>

Thanks Steve.

The source code came with a .def file exporting luaopen_zlib, but I
didn't know how to tell the linker about it. Using
__declspec(dllexport) worked well.