屡战屡败的libwebp构建

始终弄不明白这个构建到底怎么用。

官方文档给的方案

1
nmake /f Makefile.vc CFG=release-static RTLIBCFG=static OBJDIR=output

只生成静态的lib。

网上找到的攻略

1
nmake /f Makefile.vc CFG=release-dynamic RTLIBCFG=dynamic ARCH=x86 OBJDIR=output

这下似乎对了,生成了dll动态链接库。但是架构似乎对不上,而且Command Prompt有5个,我也不确定该用哪个,挨个试一试。

逐个测试

Developer Command Prompt, ARCH=x86
32bit only

Developer Command Prompt, ARCH=x64
32bit only

x64 Native Tools Command Prompt, ARCH=x86
与目标计算机不兼容,没有两个exe,但是有dll,64bit only

x64 Native Tools Command Prompt, ARCH=x64
64bit only

x86 Native Tools Command Prompt, ARCH=x86
32bit only

x86 Native Tools Command Prompt, ARCH=x64
32bit only

x64_x86 Cross Tools Command Prompt, ARCH=x86
32bit only

x64_x86 Cross Tools Command Prompt, ARCH=x64
32bit only

x86_x64 Cross Tools Command Prompt, ARCH=x86
与目标计算机不兼容,没有两个exe,但是有dll,64bit only

x86_x64 Cross Tools Command Prompt, ARCH=x64
64bit only

总之就是Native只能生成Native,Cross只能生成后面那个的。

然后是其他一些参数的测试,x64 Native ARCH=x64

RTLIBCFG=static
只是文件体积很大,不清楚发生了什么

<target> all
额外生成了一些exe