Cannot get XLSX I O library example to compile

I am writing a program which involves the user populating an excel settings sheet.

I then read it and the values feed into the program.

There seem to be a few libraries out there for reading / writing xlsx files - I settled on XLSX I / O

I am quite a noob in programming and I cannot get it to work.

What I did was:
- Installed expat
- Installed zlib using cygwin command line
- Installed libzip using cygwin command line
- added ziplip to link libraries option in linker options
- added C:/Program Files (x86)/CodeBlocks/ to linker search directories
- copied dll / dll.a / .h files from include / bin directories in the downloadable to my correspondingly named mingw directories

I am using codeblocks with mingw

I am trying to run the example called example_xlsxio_read_cpp from (https://github.com/brechtsanders/xlsxio)

The problems I ran into:
Compiler error - "error: no input files"
Not able to launch the .exe files - with error The file ziplib-4.dll is missing from your computer

My question is:
1. How to install the XLSX I O library correctly / how to get the example to compile?
2. What to do about the ziplib-4.dll file and where should it be?
What steps did you take to build the library?
It should be as simple as the standard out-of-source cmake build.
1. % mkdir build; cd build
2. % cmake <path_to_project_directory>, passing any options you want
3. % make
4. check to make sure the install step won't clobber anything
5. % su -c 'make install'

Compiler error - "error: no input files"
At what point did you get that error?
Last edited on
thank you so much for your reply

just tried manually copying the files.. *noob*

major apologies for the noob questions ahead:

0. are these cygwin commands?
1. % - what does this mean?
2. I need to navigate to the directory where the library is saved, right? like something like C:/Downloads/xlsxio?

I tried looking for a tutorial on how to use cmake but I just can't get it.., if you can point me to a noob-friendly tutorial on the matter, would really appreciate it

Are these Cygwin commands?

Hopefully ;)

% is supposed to represent your shell prompt. It's supposed to let you know that the text after it needs to be entered into a command line.

A traditional build process has three steps. You configure the source code for your machine, you do the build, and then you finally install the result. These three steps form the magic invocation
./configure; make; make install
That you may have seen before (and will see again) if you ever work with a Unix-like build system. To the user, cmake is just a way to do the first step portably.

I built it (Unfortunately not with Cygwin, but it should be close) so that you can follow by example:
The hash (#) means "comment":

% git clone https://github.com/brechtsanders/xlsxio.git xlsxio # get the code from wherever
% mkdir xlsxio-build # prepare for an out-of-source build
% cd xlsxio-build
% cmake ../xlsxio
% # at this point you'll get errors if anything's missing
% make
% # at this point the code will fail to build if there's e.g., a compiler error
% su -c 'make install'
% # installation complete; this built the examples for me and stuck them in /bin/:
% example_xlsxio_read my_file.xlsx


Note that since you're using Cygwin, you should follow the Unix build process, but Cmake can work with other build systems too (i.e., stuff other than Make):
https://askubuntu.com/a/173092
http://tldp.org/LDP/LG/current/smith.html
https://cmake.org/runningcmake/

Last edited on
thank you so much mbozzi!! (and apologies for a very late reply) this was extremely helpful - I was able to compile everything and run the examples. thank you again!!
Topic archived. No new replies allowed.