mirror of
https://github.com/jmcnamara/libxlsxwriter.git
synced 2026-05-15 14:15:54 -06:00
[GH-ISSUE #476] I beg of you, could you please release the compiled file? #372
Labels
No labels
awaiting user feedback
bug
cmake
cmake
docs
feature request
in progress
long term
medium term
medium term
pull-request
question
question
ready to close
short term
under investigation
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/libxlsxwriter#372
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @dicotom on GitHub (Mar 21, 2025).
Original GitHub issue: https://github.com/jmcnamara/libxlsxwriter/issues/476
Originally assigned to: @jmcnamara on GitHub.
I spent the entire day try to compile libxlsxwriter and because of zlib has been impossible, please release the compiled package, I beg of you
@jmcnamara commented on GitHub (Mar 21, 2025):
What system are you trying to compile on? And which method did you try?
@dicotom commented on GitHub (Mar 21, 2025):
Hi,
I use windows 10 and winlibs-x86_64-posix-seh-gcc-14.2.0-llvm-19.1.1-mingw-w64msvcrt-12.0.0-r2
but then using the method: Using vcpkg for Microsoft Visual Studio
I was able to get:
zlib:x64-windows 1.2.11#13 A compression library
zlib:x86-windows 1.2.11#13 A compression library
then I used the files generated by vcpkg with gcc of winlibs-x86_64-posix-seh-gcc-14.2.0-llvm-19.1.1-mingw-w64msvcrt-12.0.0-r2 and it worked using the dlls
I tried Installation on Windows using Mingw-w64 and MSYS2 I was successful but then the exe for the c application asked me for the msys-z.dll file so I gave up
So maybe you could tell me how do I do it with just the winlibs-x86_64-posix-seh-gcc-14.2.0-llvm-19.1.1-mingw-w64msvcrt-12.0.0-r2 installation.
@jmcnamara commented on GitHub (Mar 21, 2025):
Did you try compile directly in Mingw-w64 and MSYS2 using these instructions, including the
make install PREFIX=/usrstep:https://libxlsxwriter.github.io/getting_started.html#gsg_ming
@dicotom commented on GitHub (Mar 21, 2025):
yes I did as the last resort, but first of all the gcc version is older than the one in winlibs-x86_64-posix-seh-gcc-14.2.0-llvm-19.1.1-mingw-w64msvcrt-12.0.0-r2, then once I tried to compile the hello.c example file and tried it out, it asked me for two msys-*.dll files, which I did not have.
Basically everything failed when tried to use winlibs-x86_64-posix-seh-gcc-14.2.0-llvm-19.1.1-mingw-w64msvcrt-12.0.0-r2 even because this mingw-w64 version does not have make.exe, so I tried with ninja and it failed. I spent hours and hours trying to get it working with the version of mingw-w64 I have.
As last resort, I tried the method: Using vcpkg for Microsoft Visual Studio, which worked fine, but I still wanted to use the version of mingw-w64 I have, so what I did is:
gcc -I"C:\Users\user\AppData\Local\Nuitka\Nuitka\Cache\downloads\gcc\x86_64\14.2.0posix-19.1.1-12.0.0-msvcrt-r2\mingw64\bin\vcpkg\installed\x64-windows\include" -L"C:\Users\user\AppData\Local\Nuitka\Nuitka\Cache\downloads\gcc\x86_64\14.2.0posix-19.1.1-12.0.0-msvcrt-r2\mingw64\bin\vcpkg\installed\x64-windows\lib" hello.c -lxlsxwriter -o hello.exe
and finally I was able to get it working, so basically with the libraries and include files using the vcpkg method for microsoft visual studio, and the minizip.dll, the xlsxwriter.dll and zlib1.dll
So, To sum up, was impossible to get it working with the winlibs-x86_64-posix-seh-gcc-14.2.0-llvm-19.1.1-mingw-w64msvcrt-12.0.0-r2 which does not have make.exe, but has ninja, but it did not work.
@jmcnamara commented on GitHub (Mar 21, 2025):
Where did you download this version from so I can test it?
Also could you explain why you are using that environment?
@dicotom commented on GitHub (Mar 22, 2025):
ok, It was downloaded by nuitka which converts python to c, however you can download it from https://winlibs.com/
I'm using that because I needed the compiler that could generate the fastest exe file, so I tried all the other compilers, namely:
bcc64 (embarcadero)
cl (microsoft)
gcc as part of visual studio
icx (intel)
so for nuitka and for other c file I had to compile, gcc of winlibs-x86_64-posix-seh-gcc-14.2.0-llvm-19.1.1-mingw-w64msvcrt-12.0.0-r2 was the best.
As I said earlier, with this instructions https://libxlsxwriter.github.io/getting_started.html#gsg_ming
I was able to get hello.exe to work, but when I tried to run hello.exe, It asked me for msys-z.dll and another msys dll, and furthermore the version of gcc is older then the one that I use from winlibs-x86_64-posix-seh-gcc-14.2.0-llvm-19.1.1-mingw-w64msvcrt-12.0.0-r2
Now I found out that there is a make in the winlibs* package, which is called mingw32-make.exe, but it fails with minizip.
@dicotom commented on GitHub (Mar 22, 2025):
I finally managed to compile it with winlibs*, first I downloaded with git the zlib:
git clone https://github.com/madler/zlib.git
then I compiled the zlib with:
mingw32-make CC=gcc -fwin32/Makefile.gcc
then installed with:
mingw32-make install -fwin32/Makefile.gcc
copied the zlib1.dll, libz.dll.a and libz.a in the libxlsxwriter/lib directory
then I used the following command to compile libxlsxwriter:
mingw32-make CC=gcc LDFLAGS="-L/c/Users/user/AppData/Local/Nuitka/Nuitka/Cache/downloads/gcc/x86_64/14.2.0posix-19.1.1-12.0.0-msvcrt-r2/mingw64/bin/libxlsxwriter/lib -lz"
Then I used the following command to install it into the install directory created in libxlsxwriter folder
mingw32-make install PREFIX=$(CURDIR)/install
Then I used the following command to compile hello.c:
gcc -O3 -march=native -ffast-math -funroll-loops -fomit-frame-pointer -I"C:\Users\user\AppData\Local\Nuitka\Nuitka\Cache\downloads\gcc\x86_64\14.2.0posix-19.1.1-12.0.0-msvcrt-r2\mingw64\bin\libxlsxwriter\install\include" -L"C:\Users\user\AppData\Local\Nuitka\Nuitka\Cache\downloads\gcc\x86_64\14.2.0posix-19.1.1-12.0.0-msvcrt-r2\mingw64\bin\libxlsxwriter\install\lib" hello.c -o hello.exe -lxlsxwriter -lz
AND EVERYTHING WORKED FINE. HURRAH!
P.S. The only thing is that I had to find various linux/unix utilities like sed, ln, cp and rm for windows and put them in bin directory of winlibs*
@jmcnamara commented on GitHub (Mar 22, 2025):
Good work. Thanks for letting me know.
@dicotom commented on GitHub (Mar 22, 2025):
thanks to you for providing such a marvelous c library.