Whilst building Wireshark I ran into a nasty gotcha in Visual C++. If you set a preprocessor definition in the Preprocessor screen and you use quotes, like _U_="", the IDE happily accepts it, but shit breaks wierdly. Errors like
cl : Command line error D8003 : missing source filename
and
LINK : fatal error LNK1561: entry point must be defined
Sometimes I find myself writing code that needs thread-local variables; that is, variables that have a separate value in every thread in the process. This is handy when guarding against recursion while preserving thread-safety, for example.
I’m working on building a Win32 static library version of zlib, which uses some .asm files. One of these files, inffas32.asm, contains this line (line 647):
movd mm4,[esp+0]
This line fails to assemble with the following error:
error A2070: invalid instruction operands