jmcnamara / xlsxwriter.lua

A lua module for creating Excel XLSX files.
http://xlsxwriterlua.readthedocs.org/
MIT License
142 stars 52 forks source link

zlib not found in ZipWriter dependency. #24

Open pliniopvv opened 4 years ago

pliniopvv commented 4 years ago

I search the zlib to install but only have a 'zlib1.dll' found with this name, but this file is in the 'clib' lua folder.

The API don't function in windows?

------------------- OUTPUT C:\Program Files (x86)\Lua\luarocks3.3.1\src>lua C:\Users\GanGss\Documents\@\LUA\xlsxwriter\xlsxwriter.lua lua: ... Files (x86)\Lua\5.1\systree\share\lua\5.1\ZipWriter.lua:51: module 'zlib' not found: No LuaRocks module found for zlib no field package.preload['zlib'] no file 'C:\Program Files (x86)\Lua\5.1\systree\share\lua\5.1\zlib.lua' no file 'C:\Program Files (x86)\Lua\luarocks3.3.1\src\lua\zlib.lua' no file 'C:\Program Files (x86)\Lua\luarocks3.3.1\src\lua\zlib\init.lua' no file 'C:\Program Files (x86)\Lua\luarocks3.3.1\src\zlib.lua' no file 'C:\Program Files (x86)\Lua\luarocks3.3.1\src\zlib\init.lua' no file 'C:\Program Files (x86)\Lua\luarocks3.3.1\src..\share\lua\5.4\zlib.lua' no file 'C:\Program Files (x86)\Lua\luarocks3.3.1\src..\share\lua\5.4\zlib\init.lua' no file '.\zlib.lua' no file '.\zlib\init.lua' no file 'C:\Program Files (x86)\Lua\5.1\lua\zlib.luac' no file 'C:\Users\GanGss\AppData\Roaming/luarocks/share/lua/5.4/zlib.lua' no file 'C:\Users\GanGss\AppData\Roaming/luarocks/share/lua/5.4/zlib/init.lua' no file 'C:\Program Files (x86)\Lua\luarocks3.3.1\src\zlib.dll' no file 'C:\Program Files (x86)\Lua\luarocks3.3.1\src..\lib\lua\5.4\zlib.dll' no file 'C:\Program Files (x86)\Lua\luarocks3.3.1\src\loadall.dll' no file '.\zlib.dll' no file 'C:\Users\GanGss\AppData\Roaming/luarocks/lib/lua/5.4/zlib.dll' stack traceback: [C]: in function 'require' ... Files (x86)\Lua\5.1\systree\share\lua\5.1\ZipWriter.lua:51: in main chunk [C]: in function 'require' ...6)\Lua\5.1\systree\share\lua\5.1\xlsxwriter\packager.lua:44: in main chunk [C]: in function 'require' ...6)\Lua\5.1\systree\share\lua\5.1\xlsxwriter\workbook.lua:11: in main chunk [C]: in function 'require' C:\Users\GanGss\Documents\@\LUA\xlsxwriter\xlsxwriter.lua:9: in main chunk [C]: in ?

moteus commented 4 years ago

You have to install zlib byself. They both work on windows. https://github.com/moteus/ZipWriter#install

pliniopvv commented 4 years ago

I Try, but no one install the dependency, and I search binaries of zlib and found 'zlib1.dll' what I speak in the starter post. ...

C:\Users\GanGss\Documents\@\@APPS\downtube>luarocks install lua-zlib
Installing https://luarocks.org/lua-zlib-1.2-0.src.rock

Error: Could not find header file for ZLIB
  No file zlib.h in c:/external/include
  No file zlib.h in c:/mingw/include
  No file zlib.h in c:/windows/system32/include
You may have to install ZLIB in your system and/or pass ZLIB_DIR or ZLIB_INCDIR to the luarocks command.
Example: luarocks install lua-zlib ZLIB_DIR=/usr/local

C:\Users\GanGss\Documents\@\@APPS\downtube>luarocks install lzlib
Installing https://luarocks.org/lzlib-0.4.1.53-1.src.rock

Error: Could not find header file for ZLIB
  No file zlib.h in c:/external/include
  No file zlib.h in c:/mingw/include
  No file zlib.h in c:/windows/system32/include
You may have to install ZLIB in your system and/or pass ZLIB_DIR or ZLIB_INCDIR to the luarocks command.
Example: luarocks install lzlib ZLIB_DIR=/usr/local

C:\Users\GanGss\Documents\@\@APPS\downtube>
moteus commented 4 years ago

You have to install zlib byself. It is not a Lua module so luarocks does not install it. Luarocks does not install any external dependencies for a Lua modules. I think you can find an instruction how to build zlib quite easily I have my own Lua distro with some external deps, but I have no time to support it and update library versions. Also, it uses MS compiler. But you can check out it too