我正在尝试使用libxlsxwriter
,但我似乎可以让事情正确编译或运行。
我遵循了 Windows 的使用说明Mingw-w64
,并msys2
在此处提供:http: //libxlsxwriter.github.io/getting_started.html。
我msys2
从他们的网站安装并使用pacman -Syu
. 然后我安装zlib
了推荐的:
# Install the dev tools for libxlsxwriter.
pacman -S git gcc make zlib-devel
然后我运行代码来下载和编译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
现在有一个名为的可执行文件myexcel
,它应该创建一个基本的 excel 文档,但是当我双击它时,我得到了错误:
The program can't start because msys-2.0.dll is missing from your computer.
我也收到了丢失的错误msys-z.dll
我不确定我做错了什么或如何解决它。
任何帮助,将不胜感激
编辑:
如果我运行:
make examples
./examples/hello
hello world 示例成功运行,因此似乎安装正确。我想我只是不明白如何让它运行用户制作的 .c