Skip navigation.

Syndicate

Syndicate content

User login

visual c++

Shitty Visual C++ Gotcha

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

__declspec(thread) bites me in the ass yet again

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.

Bullshit Visual C++ 2005 regression bug

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

Syndicate content