brimworks / lua-zip

Lua binding to libzip.
80 stars 25 forks source link

zip.h #9

Closed bondhan closed 7 years ago

bondhan commented 7 years ago

Hello,

Where could I find the zip.h for windows and is it compiled-able using msvc? Thanks.

brimworks commented 7 years ago

https://nih.at/libzip/libzip-1.1.3.tar.gz

The project claims to be used by other Windows software tools, so it should be possible to compile it on Windows... however I'm not sure about using MSVC.

bondhan commented 7 years ago

Thanks, I was able to compile the libzip using ms-vc-2015 and also your lib-zip. However, I cannot load the dll on the lua interpreter as per below (but I can load my own dll which I compiled):

`Lua 5.3.1 Copyright (C) 1994-2015 Lua.org, PUC-Rio

package.loadlib("LuaSmartCardLibrary.dll", "luaopen_card")() function: 0f4eac80 package.loadlib("lib-zip-msvc14.dll", "luaopen_brimworks_zip")() stdin:1: attempt to call a nil value stack traceback: stdin:1: in main chunk [C]: in ?

`

Note that I compiled with preprocessor:

WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBZIPMSVC14_EXPORTS;LUA_BUILD_AS_DLL;LUA_LIB;%(PreprocessorDefinitions)

Could you suggest the solution for this?

bondhan commented 7 years ago

Hello, I was able to compile and load the DLL, it was because of zip.dll and zlib1.dll were missing. Thank you.

brimworks commented 7 years ago

Glad to hear you got it figured out.

Cheers, -Brian