我正在尝试使用libxlsxwriter
,但我似乎可以让事情正确编译或运行。
我按照 Windows 的说明使用Mingw-w64
and msys2
可以在这里找到:http://libxlsxwriter.github.io/getting_started.html 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
我不确定我做错了什么或如何解决。
任何帮助,将不胜感激
edit:
如果我跑:
make examples
./examples/hello
hello world 示例成功运行,因此看起来安装正确。我想我只是不明白如何让它运行用户制作的 .c