I am trying to use libxlsxwriter
, but I can seem to get things to compile or run correctly.
I followed the directions for Windows using Mingw-w64
and msys2
available here: http://libxlsxwriter.github.io/getting_started.html.
I installed msys2
from their website and updated everything using pacman -Syu
. Then I installed zlib
with the recommended:
# Install the dev tools for libxlsxwriter.
pacman -S git gcc make zlib-devel
Then I run the code to download and compile libxlswriter
:
# Clone and build libxlsxwriter.
git clone https://github.com/jmcnamara/libxlsxwriter.git
cd libxlsxwriter/
make
make install
# run example
cd ..
cc myexcel.c -o myexcel -lxlsxwriter -lz
Now there is an executable named myexcel
which should create an basic excel document, but when I double click it I get the errors:
The program can't start because msys-2.0.dll is missing from your computer.
I also get the error for missing msys-z.dll
I'm not sure what I did wrong or how to fix it.
Any help would be appreciated
edit:
if I run:
make examples
./examples/hello
The hello world example successfully runs so things seem to be installed properly. I guess I just don't understand how to get it to run a user made .c