libPNG/zLib compile error fix
Annoying little gotchas whos solutions are hard to find. Here’s one I’m making a note of on my site so I don’t have to look it up later:
Compiling libPNG requires compiling zLib as well. On Microsoft Visual Studio, you’ll get errors about invalid instruction operands:
inffas32.asm(647) : error A2070: invalid instruction operands
inffas32.asm(649) : error A2070: invalid instruction operands
inffas32.asm(663) : error A2070: invalid instruction operands
inffas32.asm(720) : error A2070: invalid instruction operands
All due to the same assembly language problem. Fix them using the dword ptr command to clear up the reference:
– movd mm7,[esi]
+ movd mm7,dword ptr[esi]