Hello,
I'm trying to use the libxlsxwriter lib to write basic excel files.
- I successfully compiled it
- The example are compiling and working using gcc or g++ from the msys command line:
gcc myexcel.c -o myexcel -I /path/to/libxlsxwriter/include \
/path/to/libxlsxwriter/lib/libxlsxwriter.a -lz
It is mandatory to specify -lz.
How to do that from codeblocks?
I have already specified the include/lib path.
=> Without -lz option I have numerous errors: undefined reference to __getreent...
=> With -lz option I have: error: cannot find -lz
According to this link
https://libxlsxwriter.github.io/getting_started.html#gsg_minizipThe source files for minizip are included in the src tree of libxlsxwriter and are statically linked by default.
Beyond this point I'm not sure to understand what is statically linked or not. If minizip is statically linked at compile-time of libxlsxwriter, why should take care of "-lz" at compile time of a source code using libxlsxwriter?
I really don't konw what to do. Any help appreciated
--Below is a optional religious debate--
Why does software-people ALWAYS provides sources codes to recompile each time and VERY RARELY precompiled binaries? The instruction set of x86-64 computers is standardized. Even if they where open sources, no ones want to recompile notepad++, google earth, chrome, 7z... I'm from the hardware world, hopefully, I don't have to recompile solidworks, eagle, ADS, Altium to use them
I'm using USB connected hardware tools: the manufacturers provides .h/.lib/.dll files. Nothing to recompile, not my job, and what a lost of time (considering millions of people are basically compiling the same sources for a couple of OS). Don't understand how it could be better to recompile libxlsxwriter and the zipper instead of using precompiled binaries. This is necessary for a particular CPU-architecture, but most of people are using standard OS on a well-known standard architecture.