[GH-ISSUE #476] I beg of you, could you please release the compiled file? #372

Closed
opened 2026-05-05 12:13:02 -06:00 by gitea-mirror · 9 comments
Owner

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

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
gitea-mirror 2026-05-05 12:13:02 -06:00
Author
Owner

@jmcnamara commented on GitHub (Mar 21, 2025):

What system are you trying to compile on? And which method did you try?

<!-- gh-comment-id:2744040943 --> @jmcnamara commented on GitHub (Mar 21, 2025): What system are you trying to compile on? And which method did you try?
Author
Owner

@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.

<!-- gh-comment-id:2744402930 --> @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.
Author
Owner

@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=/usr step:

https://libxlsxwriter.github.io/getting_started.html#gsg_ming

<!-- gh-comment-id:2744440027 --> @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=/usr` step: https://libxlsxwriter.github.io/getting_started.html#gsg_ming
Author
Owner

@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.

<!-- gh-comment-id:2744498338 --> @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.
Author
Owner

@jmcnamara commented on GitHub (Mar 21, 2025):

winlibs-x86_64-posix-seh-gcc-14.2.0-llvm-19.1.1-mingw-w64msvcrt-12.0.0-r2

Where did you download this version from so I can test it?

Also could you explain why you are using that environment?

<!-- gh-comment-id:2744652773 --> @jmcnamara commented on GitHub (Mar 21, 2025): > winlibs-x86_64-posix-seh-gcc-14.2.0-llvm-19.1.1-mingw-w64msvcrt-12.0.0-r2 Where did you download this version from so I can test it? Also could you explain why you are using that environment?
Author
Owner

@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.

<!-- gh-comment-id:2744973052 --> @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.
Author
Owner

@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*

<!-- gh-comment-id:2745196136 --> @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*
Author
Owner

@jmcnamara commented on GitHub (Mar 22, 2025):

Good work. Thanks for letting me know.

<!-- gh-comment-id:2745269553 --> @jmcnamara commented on GitHub (Mar 22, 2025): Good work. Thanks for letting me know.
Author
Owner

@dicotom commented on GitHub (Mar 22, 2025):

thanks to you for providing such a marvelous c library.

<!-- gh-comment-id:2745287079 --> @dicotom commented on GitHub (Mar 22, 2025): thanks to you for providing such a marvelous c library.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/libxlsxwriter#372
No description provided.